安装PyQt4。 “DLL加载失败:找不到指定的模块。”

时间:2016-10-21 11:23:34

标签: python pyqt4

我在互联网上看到过这个和simmilair问题,但没有一个解决方案对我有用。

我正在尝试在我的Windows 10 64x上安装PyQt4。我正在运行32x python 3.5.2。

我下载了PyQt的二进制包。我在C:\Users\...\Python35-32\Lib\site-packages\PyQt4中安装了它。接下来,我尝试在python中导入它:

>>> from PyQt4 import QtGui
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from PyQt4 import QtGui
ImportError: DLL load failed: The specified module could not be found.`.

此外,我尝试下载PyQt的源代码包,然后我尝试在CMD中安装。

C:\Users\mitch>cd C:\Users\mitch\...\Python35-32\Lib\site-packages\PyQt-win-gpl-4.11.4

C:\Users\mitch\...\Python35-32\Lib\site-packages\PyQt-win-gpl-4.11.4>configure.py
Traceback (most recent call last):
  File "C:\Users\mitch\...\Python35-32\Lib\site-packages\PyQt-win-gpl-4.11.4\configure.py", line 27, in <module>
    import sipconfig
ImportError: No module named 'sipconfig'

接下来我下载了SIP的源代码包,并尝试通过CMD安装它。

C:\Users\mitch\...\Python35-32\Lib\site-packages\PyQt-win-gpl-4.11.4>cd C:\Users\mitch\...\Python35-32\Lib\site-packages\sip-4.18.1

C:\Users\mitch\...\Python35-32\Lib\site-packages\sip-4.18.1>configure.py

C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\sip-4.18.1>configure.py
This is SIP 4.18.1 for Python 3.5.2 on win32.
The SIP code generator will be installed in
C:\Users\mitch\AppData\Local\Programs\Python\Python35-32.
The sip module will be installed in
C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-packages.
The sip.pyi stub file will be installed in
C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-packages.
The sip.h header file will be installed in
C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\include.
The default directory to install .sip files in is
C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\sip.
Creating siplib\sip.h...
Creating siplib\siplib.c...
Creating siplib\siplib.sbf...
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...

接下来我再次尝试安装PyQt,希望这次sipconfig存在。事实并非如此。

C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\sip-4.18.1>cd C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\PyQt-win-gpl-4.11.4

C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\PyQt-win-gpl-4.11.4>configure.py
Traceback (most recent call last):
  File "C:\Users\mitch\AppData\Local\Programs\Python\Python35-32\Lib\site-    packages\PyQt-win-gpl-4.11.4\configure.py", line 27, in <module>
    import sipconfig
ImportError: No module named 'sipconfig'.

我尝试将文件sipconfig从sip目录手动复制到PyQt4目录,但这也不起作用。

我已将PyQt4目录添加到PATH。 另外,我在网上读到有些人从PyQt4 / bin复制了一些文件。我的PyQt目录中没有bin目录。

0 个答案:

没有答案
相关问题