Im sorry to ask this question again. I have searched and found endles repeats of it both on stackoverflow and also on general google search. Unfortunatly I just cant get my
I had the same error today but I tried something and surprisingly it worked. In the site packages folder there will be a file named wx.pth. Open it using notepad and its contents would be like "wx-2.8-msw-unicode"
It is basically the name of the folder containing wxpython
. Delete this using Ctrl + A and copy the name of the folder from the site packages and paste it here even if it is the same.
Sounds weird but maybe the original file contained a hidden character...
Generally, package names in the site-packages folder are intended to be imported using the exact name of the module or subfolder.
If my site-packages folder has a subfolder named "foobar", I would import that package by typing import foobar
.
One solution might be to rename site-packages\wx-2.8-msw-unicode
to site-packages\wx
.
Or you could add C:\Python27\Lib\site-packages\wx-2.8-msw-unicode
to your PYTHONPATH environment variable.
You may check if you have the directory where are the packages of Python (in my machine, this dir is C:\Python27\lib\site-packages) in the Path variable on Windows. If Python's path environment variable does not have this directory, you will not find the packages.