DLL load failure error in wxPython

混江龙づ霸主 提交于 2019-12-14 03:29:15

问题


This is my first time using wxPython Python can go theatre my code

import wx
app=wx.App()
win=wx.Frame(None, -1, 'Window Title')
win.Show()
app.MainLoop()

This is the Error i'm getting:

Traceback (most recent call last):
  File "C:/Users/sancios/Desktop/huluhup", line 1, in <module>
    import wx
  File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\__init__.py", line 45, in <module>
    from wx._core import *
  File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_core.py", line 4, in <module>
    import _core_
ImportError: DLL load failed: %1 is not a valid Win32 application.

回答1:


It sounds like you are mixing Python and wxPython versions. They must match. For example, if I have Python 2.7 32-bit, then I need a wxPython 3.0 32-bit for Python 2.7. You cannot install a wxPython that is 64-bit with a Python 32-bit (or vice versa) and expect it to work.



来源:https://stackoverflow.com/questions/21741786/dll-load-failure-error-in-wxpython

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!