Reputation: 3
So i just started learning python and i'm following this tutorial: https://www.youtube.com/watch?v=RHvhfjVpSdE#t=274 . But i keep geting this error.
This is my code:
import wx
class bucky(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id, 'Frame aka window', size=(300, 200))
if __name__=='__main__':
app=wx.PySimpleApp()
frame=bucky(parent=None,id=-1)
frame.Show()
app.MainLoop()
This is my error:
Traceback (most recent call last):
File "C:/Python27/gui.py", 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 er ikke et gyldig Win32-program.
Please help!
Upvotes: 0
Views: 2017
Reputation: 2096
Maybe wrong installer, on Windows you have to ensure that if you installed Python 2.7 32 then you need to use a wxPython 3.0 for Python 2.7 32 bit.
Instead of using 3.0 you might want to use the preview build for 3.0.1 which you can find here: http://wxpython.kosoftworks.com/preview/20140707/
Upvotes: 2