[PyQt] ImportError with v4.7 Windows Binary
"V. Armando Solé"
sole at esrf.fr
Mon Jan 25 12:47:57 GMT 2010
Doug Bell wrote:
> FYI, I finaly found the problem. There is a commercial program
> (CFDesign, from Blue Ridge Numerics) installed on this PC that uses Qt
> and has Qt DLLs in a directory that is included in the PATH. If the
> CFDesign directory is renamed, then PyQt works again.
> I'm not sure what sequence Windows uses for finding DLLs on the PATH,
> but it evidently isn't in the order given in the environment variable.
If you want to know your actual path, just open a "Command prompt" and type:
nevertheless, windows is expected to look first into the program working
directory for dlls.
Personally, under windows I open a command line prompt and I run a
previously prepared bat file that sets my environment variables. That
allows me to choose compiler, python version, etc, knowing what I'm doing.
For instance, for python 2.5 I use a bat file containing:
rem "I am going to compile extensions with VS7"
echo "YOU SHOULD BE IN PLATFORM SDK WINDOW"
call "C:\Program Files\Microsoft Platform SDK\setenv.cmd" /XP32 /RETAIL
set PATH=%PATH%;C:\Program Files\GnuWin32\bin;C:\Program Files\vim\vim64
set PATH=%PATH%;C:\Program Files\UnxUtils\usr\local\wbin
and for python 2.6:
echo "Python 2.6 needs to compile extensions with VS9"
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
set PATH=%PATH%;C:\Program Files\GnuWin32\bin;C:\Program Files\vim\vim64;
Two totally different environments coexisting at the price of having to
start everything from the prompt.
More information about the PyQt