Python 3.x Pyinstaller无法在MacOSX上导入python3中的站点模块

Python 3.x Pyinstaller无法在MacOSX上导入python3中的站点模块,python-3.x,macos,pyinstaller,macos-high-sierra,Python 3.x,Macos,Pyinstaller,Macos High Sierra,我正在尝试使用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... 29

我正在尝试使用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()
...
292信息:检查分析
292信息:正在生成分析,因为out00-Analysis.toc不存在
292信息:正在初始化模块依赖关系图。。。
298信息:正在初始化模块图挂钩。。。
299信息:正在分析base_library.zip。。。
无法导入站点模块
回溯(最近一次呼叫最后一次):
文件“/usr/local/ceral/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py”,第544行,in
main()
...
…并继续显示较长的导入错误列表 可能是我的python3配置或pyinstaller规范文件有问题。 我目前使用的是默认的pyinstaller规范文件。 以下是我正在测试的系统:

  • MacOSX 10.13.3(塞拉利昂高地)
  • Python 3.6.4(使用brew安装)
  • pyinstaller 3.3.1(使用pip安装)
非常感谢您的帮助。

Mac 10.13.3

Python 3.6.4

Pyinstaller 3.3.1

我遇到了这个问题,我的决心是:

pip3卸载enum34

依照