Pyinstaller可以在Windows上将我的应用程序编译成.exe文件,但我无法在Mac上构建一个可用的.app。我试过--onefile和--onedir,但是没有骰子,应用程序只是打开然后关闭,报告崩溃。这看起来像是一个模块导入问题,但我已经尝试过通过pathex和datas中的.spec文件导入所有模块。我已经将pyinstaller重新安装到了release和dev版本。有什么主意我还能试试吗?谢谢!在
系统:
PyInstaller:3.3.1
Python:3.6.3
平台:Darwin-16.7.0-x86_64-i386-64位
命令:
pyinstaller--onedir--name=StaticBot--窗口化静态机器人规范在
规范文件:# -*- mode: python -*-
import sys
sys.setrecursionlimit(5000)
block_cipher = None
a = Analysis(['../main.py'],
pathex=[
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5',
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil',