我已经创建了一个Python脚本并将其转换为.exe文件,具体步骤如下:
Pyinstaller –-onefile RFOutputGraphs.py
虽然它可以工作,但是脚本中的一个任务失败了,尽管在Python中运行时完美地工作。
我的错误信息是:
FileNotFoundError: [Errno 2] no such file or directory:
'C:\\Users\\Nicholas\\AppData\\Local\\Temp\\_MEI30362\\currency_converter
\\eurofxref-hist.zip'
我猜测它无法识别一个可能是不常见的模块(currencyconverter)。有没有修复这个问题的方法呢?谢谢。
--add-binary
选项。类似这样的命令Pyinstaller --add-binary <path to zip>;currency_converter --onefile RFOutputGraphs.py
- John Anderson