Python
3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32*
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import wx
Traceback (most recent call last):
File “”, line 1, in
File
“R:\python\lib\site-packages\wx_init_.py”, line 17, in *
from wx.core import *
File “R:\python\lib\site-packages\wx\core.py”, line 12, in
_from .core import *
ImportError:
DLL load failed: %1 is not a valid Win32 application*
>>>
On
Windows 7/32 bit has not problem.
Any
suggestions ?
One of the possible reasons for that error is if it’s trying to use a 64bit DLL in a 32bit context, however it’s working for me here with 32-bit Python on 64-bit Windows 10.
python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32
bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
Do you have anything set in the environment or registry that may be affecting the sys.path and causing the wrong set of wx or wxPython binaries to be loaded? Have you tried completely clearing all traces of wxPython and installing the wheel again? In the example above I created a
new virtual environment to use for the test, you may want to try that too if the other hints don’t help. Another thing that may help would be to use the DependencyWalker tool to see exactly which DLLs are being loaded, or attempting to load.
Python
3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32*
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import wx
Traceback (most recent call last):
File “”, line 1, in
File
“R:\python\lib\site-packages\wx_init_.py”, line 17, in *
from wx.core import *
File “R:\python\lib\site-packages\wx\core.py”, line 12, in
_from .core import *
ImportError:
DLL load failed: %1 is not a valid Win32 application*
>>>
On
Windows 7/32 bit has not problem.
Any
suggestions ?
One of the possible reasons for that error is if it’s trying to use a 64bit DLL in a 32bit context, however it’s working for me here with 32-bit Python on 64-bit Windows 10.
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32
bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
Do you have anything set in the environment or registry that may be affecting the sys.path and causing the wrong set of wx or wxPython binaries to be loaded? Have you tried completely clearing all traces of wxPython and installing the wheel again? In the example above I created a
new virtual environment to use for the test, you may want to try that too if the other hints don’t help. Another thing that may help would be to use the DependencyWalker tool to see exactly which DLLs are being loaded, or attempting to load.