【发布时间】:2020-10-06 01:13:14
【问题描述】:
虽然通过命令“pyinstaller --onefile filename.py”可以成功完成从*.py-到独立的*.exe文件的转换,但可执行文件本身无法运行
Traceback(最近一次调用最后一次):文件 "venv\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", 第 13 行,在文件中 "c:\users\user01\pycharmprojects\api4trd\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 第 623 行,在 exec_module 中 exec(bytecode, module.dict) 文件“lib\site-packages\pkg_resources__init__.py”,第 86 行,在 ModuleNotFoundError:没有名为“pkg_resources.py2_warn”的模块 [13560] 执行脚本pyi_rth_pkgres失败
使用以下包
1) 数学
2) 日期时间
3) yfinance
Python 版本:3.8.1
pyinstaller 版本:3.6
操作系统:W10
谢谢!
【问题讨论】:
标签: python exe pyinstaller