虽然可以通过命令“pyinstaller--onefile filename.py”成功完成从*.py-到独立*.exe文件的转换,但可执行文件本身无法运行
Traceback (most recent call last): File "venv\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 13, in File "c:\users\user01\pycharmprojects\api4trd\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module exec(bytecode, module.dict) File "lib\site-packages\pkg_resources__init__.py", line 86, in ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [13560] Failed to execute script pyi_rth_pkgres
使用以下软件包
1)数学
2)日期时间
3)财政
Python版本:3.8.1
pyinstaller版本:3.6
OS:W10
谢谢大家!
pyinstaller命令中缺少一个隐藏导入。虽然Python和Pyinstaller的早期版本从未出现过此错误,但这里仍然是解决方案
相关问题 更多 >
编程相关推荐