Python – WxPython, Windows Vista 64-bit, and failure

64-bitpythonwindows-vistawxpython

I have Windows Vista 64-bit SP2. I am trying to use wxPython for GUI development with Python, because all my research pointed to that as the way to go. I have downloaded and installed the win64 wxPython. I get the same error every time.

Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.

>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 4
5, in <module>
    from wx._core import *
  File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, i
n <module>
    import _core_
ImportError: DLL load failed: %1 is not a valid Win32 application.

I have installed on my python off the c, I have installed python26 in c:\program files (x86) and installing wxPython there, I have used 32bit, 64bit. I have tried searching everywhere for a similar problem, and I have hardly seen anyone else with this issue. Any help would be greatly appreciated.

Best Answer

It looks like you're trying to run 64-bit wxPython on 32-bit Python. You need them both to be for the same architecture.

Related Topic