PyQt 4.7 - ImportError after installing on Windows

Reshure picture Reshure · Jan 26, 2010 · Viewed 24k times · Source

I've been trying to install PyQt 4.7 on Vista, but I am getting an ImportError when I try to do: from PyQt4 import QtCore, QtGui.

ImportError: DLL load failed: The specified module could not be found.

I've checked my System Path, and C:\Python31\Lib\site-packages\PyQt4\bin is on there.

I can't run any of the examples, but the Designer, Assistant and Linguist run fine.

I am using ActivePython 3.1, if that makes any difference. And I haven't had any previous version of PyQt installed.


Edit:

I've copied the QtCore4 and GtGui4 dlls to C:\Python31\Lib\site-packages\PyQt4. That fixes some of the examples, but I still can't use the example browser.

Answer

Jason Coon picture Jason Coon · Jan 26, 2010

Are you sure there is a \bin directory for your version of PyQt? I am running PyQt 4.4, and all my binaries are right in:

C:\Python31\Lib\site-packages\PyQt4

Which is what I have my path pointing too. It sounds like PyQt4 was installed improperly... did you run this?

python setup.py install

There shouldn't be a bin there...