简体   繁体   中英

I converted my .py into .exe using pyinstaller and py-to-exe but i am getting error while executing

enter image description here

Error image and code snip have been attached. I have created exe using py-to-exe and pyinstaller but not able to run please help me to make this exe as executable.

if os.path.exists("ResultCRMDailyFile.csv"): os.remove("ResultCRMDailyFile.csv") else: time.sleep(5) data = pd.read_csv("CRMDailyFile.csv", names= col_names, skiprows=[0], encoding='utf-8', errors='ignore') data.insert(3, column="UTCDclDate_c", value=data["UTCAppDate_c"]) data["UTCAppDate_c"] = np.where(data["ApprovedDeclined_c"] == 'Approved', data["UTCAppDate_c"], '') data["UTCDclDate_c"] = np.where(data["ApprovedDeclined_c"] == 'Declined', data["UTCDclDate_c"], '') data = data.to_csv("ResultCRMDailyFile.csv", index=False) print(data.head())

Make sure that python is added to the PATH .

And run the following in your terminal

pyinstaller --onefile pythonScriptName.py -w --icon=iconFileName.ico

-w and icon are optional.

-w is to remove the black screen (console/ terminal window) while launching the .exe file

icon is used to set an icon for your .exe file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM