Joe*_*Doe 10 python sip pyinstaller pyqt5
我开发了一些在Python 3.5.4上运行良好的程序,但由于win32的一些错误让我进入Python 3.6.4,但是当我使用pyinstaller构建我的项目时,我得到:
C:\Users\User\Desktop\dist\mycommentator>mycommentator.exe
Traceback (most recent call last):
File "mycommentator.py", line 6, in <module>
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname)
ModuleNotFoundError: No module named 'PyQt5.sip'
[1532] Failed to execute script mycommentator
Run Code Online (Sandbox Code Playgroud)
我试图重新安装python,所以我安装了Python 3.6.4/Python 3.6.5,这个错误也发生在我身上.无论我在PyQt5中构建什么代码,每次都出现此错误.
我也尝试移动sip.pyd
到项目文件夹,但仍然发生错误.我也尝试过pip install --upgrade sip
,但没有帮助.我也尝试安装pyinstaller的开发版本,这也没有帮助.
joh*_*shu 15
我有同样的问题,由于sip
现在单独安装,显然是一个已知的错误.
https://github.com/pyinstaller/pyinstaller/issues/3630
在创建安装程序后,我添加了以下行:
--hidden-import PyQt5.sip
这没有问题.
归档时间: |
|
查看次数: |
12645 次 |
最近记录: |