python - python 上的可执行文件出现问题

标签 python pyinstaller

我使用 pyinstaller 从 python 脚本生成 .exe,它输出得很好,但当我尝试执行时出现此错误。

  File "PyInstaller/loader/rthooks/pyi_rth_pkgres.py", line 13, in <module>
  File "/home/arturo/.local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "pkg_resources/__init__.py", line 86, in <module>
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[25405] Failed to execute script pyi_rth_pkgres

我已经准备好重新安装setuptools。

最佳答案

感谢您的解决方案。它适用于 Windows 10/python 3.7.2:

pip uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip 

关于python - python 上的可执行文件出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60152370/

相关文章:

python - 在虚拟环境中运行supervisor

python - 'Q' 对象没有属性 'split' - Django

python - pyqt中标签随时间变化

python - 使 pyinstaller --onefile install 可移植

selenium - 163 信息 : UPX is not available. Selenium pyinstaller 一个文件.exe

具有多处理功能的 Python 全局数组

python - 使用二维 numpy 数组有效填充 pandas 数据框

python - 在 anaconda 环境中使用 pyinstaller

python - 在 Python 3.x 中使用 PyInstaller 编译 gettext 语言环境

django - Pyinstaller可执行运行时错误: Script runserver not found