PyQt4 和 64 位 python
我正在尝试使用我编写的程序启动并运行 64 位版本的 python。该程序使用我在 PyQt4 中编写的 gui。我找不到 64 位版本的 PyQt4,并且在尝试将 32 位 PyQt4 与 64 位版本的 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.
显然存在不兼容。我尝试了此修复,但遇到了相同的错误:
http://code .google.com/p/pyqt4-win64-binaries/downloads/list
让我知道您是否知道如何解决这个问题!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
适用于 Windows 的 64 位 PyQt 二进制文件位于 http://www.lfd.uci。 edu/~gohlke/pythonlibs/#pyqt
更新:适用于 Windows 的 64 位 PyQt4 二进制文件(包括 MySQL 扩展)现已正式从 Riverbank 获取,网址为 http://www.riverbankcomputing.co.uk/software/pyqt/download
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
您可以使用 64 位架构安装 PyQt4,尝试查看此处 http://eoyilmaz.blogspot.com/2009/09/how-to-compile-pyqt4-for-windows-x64.html
没有尝试过,但我在 OSX 上做了类似的事情
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