[PyQt] PyQt for 64-bit Python on Windows
Dave Doty
ddoty at iastate.edu
Tue Feb 10 21:54:28 GMT 2009
I attempted to run
pythonw PyQt4/examples/tools/qtdemo/qtdemo.pyw
After installing the Windows binaries for PyQt 4.4.4-2, with 64-bit Python
2.6.1, on 64-bit Windows Vista Business, and received the following error
message:
Traceback (most recent call last):
File "qtdemo.pyw", line 28, in <module>
from PyQt4 import QtGui
ImportError: DLL load failed: %1 is not a valid Win32 application.
I found the following mailing list thread that appears to deal with this
issue:
http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg15804.html
The answer to that person's question was, "I don't see how a 64 bit
interpreter can be expected to handle a 32 bit .pyd extension."
I assume that this answer means, "The PyQt Windows binaries cannot be used
with the 64-bit Python interpreter. You must build PyQt yourself in order to
use it with 64-bit Python 2.6.1". I attempted to do so following the
instructions on the PyQt webpage, starting with installing SIP, using g++,
make, and bison under cygwin to do the compilation. However, after running
"python configure.py -p win32-g++", and running "make", I received the
following error:
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o transform.o
transform.c
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o gencode.o gencode.c
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o export.o export.c
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o heap.o heap.c
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o parser.o parser.c
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o lexer.o lexer.c
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -Wl,-s -o sip.exe
main.o transform.o gencode.o export.o heap.o parser.o lexer.o
make[1]: Leaving directory
`/cygdrive/c/Users/ddoty/Downloads/python/sip-4.7.9/sipgen'
make[1]: Entering directory
`/cygdrive/c/Users/ddoty/Downloads/python/sip-4.7.9/siplib'
gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
-Ic:\programs\Python26\include -o siplib.o siplib.c
siplib.c:16:20: Python.h: No such file or directory
In file included from siplib.c:22:
sip.h:46:2: #error "This version of SIP requires Python v2.3 or later"
In file included from siplib.c:22:
sip.h:190: error: parse error before "PyHeapTypeObject"
sip.h:200: error: parse error before '}' token
sip.h:207: error: parse error before "PyObject_HEAD"
...
and the parse errors go on for a while.
Is there a prebuilt 64-bit PyQt binary for Windows that I can use instead?
Alternately, did I misunderstand the advice from the other mailing list
thread, and in fact there is some other problem that I can fix to use the
PyQt Windows binaries with 64-bit Python 2.6.1?
Thank you,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090210/1e1bde2c/attachment.html
More information about the PyQt
mailing list