python qt 程序打包
2020-07-05 本文已影响0人
王国的荣耀
安装pyinstaller
vim .bash_profile
export PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:$PATH
通过pip show PyInstaller找到模块安装目录
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
source .bash_profile
发现只在当前终端窗口起作用,关闭终端之后,在运行pyinstaller出现“command not found: pyinstaller”。
解决办法
在~/.zshrc文件最后,增加一行:
source ~/.bash_profile
#或者
export PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:$PATH
打包python qt 程序
安装以后 运行pyinstaller打包命令
pyinstaller --windowed --onefile --clean --noconfirm demo2_1Hello.py

后续
app 代码的签名