【发布时间】:2018-07-30 06:40:03
【问题描述】:
我正在尝试使用 pyinstaller(版本 3.3.1)打包(冻结)python3 应用程序
在运行pyinstaller my_script.py 后,它会失败并显示导入错误列表,其中第一个错误如下:
292 INFO: checking Analysis
292 INFO: Building Analysis because out00-Analysis.toc is non existent
292 INFO: Initializing module dependency graph...
298 INFO: Initializing module graph hooks...
299 INFO: Analyzing base_library.zip ...
Failed to import the site module
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 544, in <module>
main()
...
...并继续列出更长的导入错误 可能是我的 python3 配置或 pyinstaller 规范文件有问题。 我目前正在使用默认的 pyinstaller 规范文件。 以下是我正在测试的系统:
- MacOSX 10.13.3(高山脉)
- Python 3.6.4(使用 brew 安装)
- pyinstaller 3.3.1(使用 pip 安装)
非常感谢您的帮助。
【问题讨论】:
标签: python-3.x macos pyinstaller macos-high-sierra