关于python3+Qt5进行pyinstaller打包时的坑
Tofloor
poster avatar
137******60
deepin
2018-10-19 01:18
Author
昨晚在用pyinstaller为软件打包时一直出现
  1. 7259 INFO: Building COLLECT out00-COLLECT.toc
  2. Security-Alert: try to store file outside of dist-directory. Aborting. '/usr/lib/x86_64-linux-gnu/qt5/qt.conf'
Copy the Code

原以为PyInstaller版本不对,或Qt5组件缺少。今天在单位电脑上重新打包却正常。百度好久没找到答案,后来突然想到pyqt5是用apt安装的,是不是pyinstaller在重新对pyqt5进行编译。于是使用pip3 list查看果然发现没有PyQt5包
运行sudo pip3 install PyQt5
然后再打包,正常了。

特此分享
Reply Favorite View the author
All Replies
avatar
albertofwb
deepin
2020-07-01 19:58
#1
我也遇到了同样 的问题。

在 UOS-20 用 pip3 安装 pyqt5 有问题  ,参考这里 https://stackoverflow.com/questions/59711301/install-pyqt5-5-14-1-on-linux
另外,pyqt5环境安装好之后,需要先删除之前 pyinstaller 产生的所有临时文件,不然还会报上面的错误
Reply View the author
avatar
wc******20@gmail.com
deepin
2020-07-01 23:22
#2
pyqt5应该用 pip安装的版本才行,要不然可能会有问题吧,pyinstaller确实很坑,然后在win下的pyinstaller生成的软件居然被流氓杀毒软件报病毒。。。
Reply View the author