2015-06-23 93 views
0

我很喜欢Python,现在我很难安装PyQt和PyQwt。为什么在安装python后无法导入pyqt?

我搜索了如何做很多网站,但我仍然无法摆脱这个问题。 现在我决定按照Christoph Gohlke's。 我成功地使用pip来安装numpy wheel文件,并且可以在python中导入它,但它不适用于PyQt和PyQwt。

对于PyQt的,当我通过CMD这个

pip install PyQt4-4.11.4-cp27-none-win_amd64.whl 

安装车轮文件看起来

Requirement already satisfied (use --upgrade to upgrade): PyQt4==4.11.4 from file:///C:/Users/Mann/Downloads/PyQt4-4.11.4-cp27-none-win_amd64.whl in c:\python27\lib\site-packages 

我想安装可能成功,所以我尝试导入PyQt4的在Python2.7

import PyQt4 

但失败并出现错误

Traceback (most recent call last): 
    File "<pyshell#0>", line 1, in <module> 
    import PyQt4 
ImportError: No module named PyQt4 

我还在“脚本”目录中调用pip.exe作为https://stackoverflow.com/a/27909082/5041101表示,但它仍然是一样的。 请帮我解决这个问题。

谢谢

+0

什么是可以在_c找到确切的包名称:\ python27 \ LIB \站点packages_?它是** PyQt4 **? – Andersson

回答

1

您是否尝试强制重新安装?

pip install --force-reinstall PyQt4-4.11.4-cp27-none-win_amd64.whl 

pip install --upgrade --no-deps --force-reinstall PyQt4-4.11.4-cp27-none-win_amd64.whl 
+1

非常感谢。如果你没有启发我如何去做,我会很难继续。 – Magemann

相关问题