pyqt设计
程序员文章站
2022-03-22 12:11:40
pyqt是python设计GUI的第三方包 作为一个小白,我觉得这篇博客贼好,我就是按照这个 "博客" 写的。 这个博客一共分5步,每一步都特别详细。 pyqt 打包exe时遇到的问题(我的python环境是anaconda3) 1、 解决方案1 2、 解决方案2 重新安装环境,不使用anacond ......
pyqt是python设计gui的第三方包
作为一个小白,我觉得这篇博客贼好,我就是按照这个写的。
这个博客一共分5步,每一步都特别详细。
pyqt 打包exe时遇到的问题(我的python环境是anaconda3)
python pyinstaller 打包报错:attributeerror: 'str' object has no attribute 'items'
1、 解决方案1
网上查询,可能是setuptools比较老: 更新一下 pip install --upgrade setuptools 按此方法,解决了我的问题,特记录。
2、 解决方案2
重新安装环境,不使用anaconda的环境
遇到问题2
pyqt5 cannot read qlibraryinfo output: raised expecting value: line 1 column 1 (char 0) when decoding
这个问题我猜测可能是版本不兼容问题, 问题可参考
具体就是找到
python3.5/dist-packages/pyinstaller/utils/hooks/qt.py line: 41#这里,然后修改如下
json_str = '{"isdebugbuild": false, "version": [5, 11, 2], "location": {"archdatapath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt", "libraryexecutablespath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/libexec", "qml2importspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/qml", "examplespath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/examples", "documentationpath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/doc", "pluginspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/plugins", "librariespath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/lib", "importspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/imports", "headerspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/include", "translationspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/translations", "settingspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt", "prefixpath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt", "datapath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt", "testspath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/tests", "binariespath": "/usr/local/lib/python3.5/dist-packages/pyqt5/qt/bin"}}'
注意:将/usr/local/lib
改为你自己的python路径
上一篇: ps路径怎么3D立体化?
推荐阅读