简体   繁体   English

如何使用python 2.7在Windows7 32位上安装pyqt4

[英]How to install pyqt4 on windows7 32 bits using python 2.7

I'm using Python 2.7 on Windows7 32 bits. 我在Windows7 32位上使用Python 2.7。 When I run a script, it complains 当我运行脚本时,它抱怨

ImportError: No Module named 'PyQt4'

So I tried to install it, but pip install PyQt4 gives Could not find any downloads that satisfy the requirement PyQt4 although it does show up when I run 所以我尝试安装它,但是pip install PyQt4给出了找不到满足要求PyQt4的下载,尽管它在我运行时会显示

pip search PyQt4 . pip search PyQt4

I tried to 我试过了

pip install python-qt

which installed successfully but that didn't solve the problem. 哪个安装成功,但不能解决问题。

What am I doing wrong? 我究竟做错了什么?

Hard to tell without knowing everything of your environment configuration (virtual or not, etc.). 在不了解您的所有环境配置(虚拟或非虚拟等)的情况下很难说出来。 But you may want to use Christoph Gohlke's excellent site ( https://www.lfd.uci.edu/~gohlke/pythonlibs/ ) and download this: PyQt4‑4.11.4‑cp27‑cp27m‑win32.whl. 但是您可能想要使用Christoph Gohlke的出色站点( https://www.lfd.uci.edu/~gohlke/pythonlibs/ )并下载此文件:PyQt4‑4.11.4‑cp27‑cp27m‑win32.whl。

Was a lifesaver for me many times … 对我来说,是个救星……

pip install pathToDownload\PyQt4‑4.11.4‑cp27‑cp27m‑win32.whl

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM