I've just built wxPython-126.96.36.199 on a Solaris 10 box,
successfully it would seem. But when trying to run the
demo I get:
$ python demo.py
Traceback (most recent call last):
File "demo.py", line 3, in ?
line 34, in ?
import wx # This module uses the new wx namespace
line 45, in ?
from wx._core import *
line 4, in ?
ImportError: No module named _core_
> I've just built wxPython-188.8.131.52 on a Solaris 10 box,
> successfully it would seem. But when trying to run the
> demo I get:
> $ python demo.py
> Traceback (most recent call last):
> File "demo.py", line 3, in ?
> import Main
> line 34, in ?
> import wx # This module uses the new wx namespace
> line 45, in ?
> from wx._core import *
> line 4, in ?
> import _core_
> ImportError: No module named _core_
> Any ideas?
From the path names above it looks like you are trying to use wxPython
from the build folder and not an installed version. Correct? If so,
did you build using "build_ext --inplace" on setup.py command line?
That is what is needed to put the binary extension modules into the
in-tree wx package. Otherwise you'll want to use the setup.py install
command and then make sure that your sys.path is such that it will find
the installed wx package before the one in the build tree.
http://wxPython.org Java give you jitters? Relax with wxPython!
Just ran into this error myself. The diagnosis is accurate, I was trying to run the demo from the build folder. But, I was merely following the directions spit out out at the end of the build which said:
------------ BUILD FINISHED ------------
To run the wxPython demo you may need to: - set your PYTHONPATH variable to /Users/foobar/Downloads/wxPython-src-184.108.40.206/wxPython - set your DYLD_LIBRARY_PATH to /Users/foobar/Downloads/wxPython-src-220.127.116.11/bld/cocoa/lib
And then: - Run python demo/demo.py
Since this is the first Python package I've ever built, I was clueless until I read this post. After I reset the environment variables to the installed location (see below), the demo finally ran!! (I've been fighting with wx, & wxPython for days. This is the first version that has actually run correctly on OS X 10.8... 64-bit/Cocoa only)