Mac 2.8.8.0 wxversion error

Hi,

this sequence of statements seems not work on Mac (on my LInux box
with 2.8.8.0 it is working).

import wxversion
wxversion.select(str(2.8))
import wx

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
ImportError: No module named _core_

wx.__version__

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'wx' is not defined

Suggestions?

Thanks in advance, Martin Landa

···

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa wrote:

Hi,

this sequence of statements seems not work on Mac (on my LInux box
with 2.8.8.0 it is working).

import wxversion
wxversion.select(str(2.8))
import wx

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
ImportError: No module named _core_

wx.__version__

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'wx' is not defined

Suggestions?

In 2.8.8.0 the wx pacakges are installed in a different way such that the same wxPython installation can be used from both Apple's Python and also MacPython from python.org. My guess is that there are still some left-over files in the old location that are getting picked up instead of the ones in the new location. Try manually removing all wx* files and folders from /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ *except* for wxredirect.pth.

A quick test like this will help you ensure the correct files are being found:

$ python -c "import wx; print wx.__file__"
/usr/local/lib/wxPython-unicode-2.8.8.0/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.pyc

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi,

thanks Timothy and Robin for answers!, it is problem of one of my
colleagues. He will try to fix it.

Martin

···

2008/7/7 Robin Dunn <robin@alldunn.com>:

Martin Landa wrote:

Hi,

this sequence of statements seems not work on Mac (on my LInux box
with 2.8.8.0 it is working).

import wxversion
wxversion.select(str(2.8))
import wx

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
File
"//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
ImportError: No module named _core_

wx.__version__

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'wx' is not defined

Suggestions?

In 2.8.8.0 the wx pacakges are installed in a different way such that the
same wxPython installation can be used from both Apple's Python and also
MacPython from python.org. My guess is that there are still some left-over
files in the old location that are getting picked up instead of the ones in
the new location. Try manually removing all wx* files and folders from
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
*except* for wxredirect.pth.

A quick test like this will help you ensure the correct files are being
found:

$ python -c "import wx; print wx.__file__"
/usr/local/lib/wxPython-unicode-2.8.8.0/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.pyc

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *