0

I'm new to wxPython. I just installed Python 2.7.9 and wxPython for 2.7 on my Windows 7. When I try to run the "helloworld" file

#!/usr/bin/env python
import wx

app = wx.App(False)  # Create a new app, don't redirect stdout/stderr to a window.
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
frame.Show(True)     # Show the frame.
app.MainLoop()

from the official website.I got this error

c:\Workspace>python hellowword.py
Traceback (most recent call last):
  File "hellowword.py", line 2, in <module>
    import wx
ImportError: No module named wx

I've looked through other posts on stacksoverflow, e.g.Wx not importing Can't load packages due to 'No module named wx' error

But none of them worked.

I've already added directory of wxPython to path "C:\Python27\Lib\site-packages". Still failed.

Could anyone help me with this, please?

Thanks in advance!

Community
  • 1
  • 1
Kennard
  • 845
  • 2
  • 12
  • 32
  • what the the installation enviornment i.e. OS, python version and the wx version you trying to install ? – cmidi Feb 03 '15 at 21:54
  • http://wxpython.org/BUILD-2.8.html I had to follow step by step installation guide at this page to make it work – cmidi Feb 03 '15 at 22:12
  • Thanks a lot for prompt response. I already fixed this by reinstalling python and wxPython, following this instruction step by step. https://www.youtube.com/watch?v=NMjV_HGLAQE – Kennard Feb 03 '15 at 22:38

1 Answers1

0

I already fixed this by reinstalling python and wxPython, following this instruction step by step. https://www.youtube.com/watch?v=NMjV_HGLAQE

Kennard
  • 845
  • 2
  • 12
  • 32