Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DLL load failed: 1% is not valid win32 application

Tags:

wxpython

import wx

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

I have tried python2.6 and python2.7 with several wxpython versions,they all turned out to be like this.All the versions are win64 as well as my OS,please hep!

like image 554
user1209152 Avatar asked Feb 14 '12 13:02

user1209152


2 Answers

As mentioned by the other fellow, make sure you have a 64-bit Python AND a 64-bit wxPython version downloaded. If one or the other is 32-bit, it won't work. Personally, I have never had any problems installing wxPython on Windows.

like image 132
Mike Driscoll Avatar answered Oct 31 '22 11:10

Mike Driscoll


I had this problem in windows 7 with Python2.7 as I have installed 32bit wx version earlier. Try installing 64bit and it will work fine.If you are in 64 bit system and trying to install 32bit wx you will get some error at the beginning. So try 64bit wx.

like image 2
Roy Avatar answered Oct 31 '22 11:10

Roy