Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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:Python27libsite-packageswx-3.0-mswwx\__init__.py", line 45, in <module>
    from wx._core import *
  File "C:Python27libsite-packageswx-3.0-mswwx\_core.py", line 4, in <module>
    import _core_
ImportError: DLL load failed: %1 is not a valid Win32 application.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
282 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...