PyQt4 and 64-bit python

2019-02-14 11:45发布

I am trying to get the 64-bit version of python up and running with a program I wrote. That program uses a gui I wrote in PyQt4. I cannot find a 64-bit version of PyQt4 and I get the following error when attempting to use the 32-bit of PyQt4 with the 64-bit version of python:

S:\src>SimLauncher.py
Forcing DISTUTILS_USE_SDK=1
Traceback (most recent call last):
 File "SimLauncher.py", line 42, in <module>
   from SwSim import SwSim
 File "SwSim.py", line 13, in <module>
   from PyQt4 import QtSql,QtGui
ImportError: DLL load failed: %1 is not a valid Win32 application.

Clearly there is an incompatibly. I tried this fix, but I got the same error:

http://code.google.com/p/pyqt4-win64-binaries/downloads/list

Lemme know if you know how to solve this!

2条回答
疯言疯语
2楼-- · 2019-02-14 12:33

64 bit PyQt binaries for Windows are available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt

Update: 64 bit PyQt4 binaries for Windows, including the MySQL extension, are now officially available from Riverbank at http://www.riverbankcomputing.co.uk/software/pyqt/download

查看更多
放我归山
3楼-- · 2019-02-14 12:36

You can install PyQt4 using 64bit architecture, try looking here http://eoyilmaz.blogspot.com/2009/09/how-to-compile-pyqt4-for-windows-x64.html

Haven't tried it but I did something similar on OSX

查看更多
登录 后发表回答