我试图下载PyQt4但是它似乎没有lomger可用,所以我下载了最接近它的东西,我可以找到PyQt-win-gpl-4.8.4。问题是,当我尝试按照“使用Python和QT进行快速GUI编程”中的示例时,我无法使用某些导入,例如从PyQt4.QtCore导入*给我以下错误(从IDLE复制):
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
`import sys
`import time
`from PyQt4.QtCore import *
**Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from PyQt4.QtCore import *
ImportError: DLL load failed: The specified procedure could not be found.
>>>**
答案 0 :(得分:3)
您下载了源包,因此您必须编译所有内容。试试Riverbank's page底部的二进制包。如果您在32位系统上使用python 2.7,则需要下载PyQt-Py2.7-x86-gpl-4.8.4-1.exe
。
答案 1 :(得分:2)
据我所知,你可以用以下任何一个来安装pyqt4:
pip install pyqt4
或
easy_insatll pyqt4
或
http://www.riverbankcomputing.co.uk/software/pyqt/download
- &GT;在Binary Packages下选择一个与你的python版本和系统相对应的那个
对你而言,这应该是正确的:pyqt4 py2.7 32bit