wxversion problem

I have several versions of wxpython on my computer (MacOS10.5.4, Intel
core 2 duo). I've been using 2.8.7.1, which is in
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/
My script has had in it these lines:

import wxversion
wxversion.select("2.8.7")

and has been running correctly.

Recently I installed 2.8.8.1. That installed itself in
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/

Things still run correctly (so long as I don't use wxversion).
2.8.8.1 is the default version. However, whether I try wxversion for
2.8.7.1 or 2.8.8.1 I get an importError. For example, from the
interpreter:

~ > python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import wxversion
wxversion.select("2.8.7")
import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
    from wx._core import *
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
    import _core_
ImportError: dlopen(/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
2): Library not loaded:
/usr/local/lib/wxPython-unicode-2.8.7.1/lib/libwx_macud-2.8.0.dylib
  Referenced from:
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so
  Reason: Incompatible library version: _core_.so requires version
5.0.0 or later, but libwx_macud-2.8.0.dylib provides version 2.6.0

~ > python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import wxversion
wxversion.select("2.8.8")
import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
    from wx._core import *
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
    import _core_
ImportError: dlopen(/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
2): Library not loaded:
/usr/local/lib/wxPython-unicode-2.8.7.1/lib/libwx_macud-2.8.0.dylib
  Referenced from:
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so
  Reason: Incompatible library version: _core_.so requires version
5.0.0 or later, but libwx_macud-2.8.0.dylib provides version 2.6.0

What am I doing wrong? I need to have 2.8.7.1 accessible for a while longer.

Thanks,

Ian

···

--
Ian York (iayork@iayork.com) <http://www.iayork.com/&gt;
"-but as he was a York, I am rather inclined to suppose him a
very respectable Man." -Jane Austen, The History of England

Hello,

Are you sure you have not installed version 2.8.8.1 over 2.8.7.1 ?
On MS-Windows, if you do not take care, both version are installed into the same folder: Python/lib/site-packages/wx-2.8xxxx. So, you have to specify the install folder to avoid this (do not use default install).

I hope this could help.
Mathias

Ian York wrote:

···

I have several versions of wxpython on my computer (MacOS10.5.4, Intel
core 2 duo). I've been using 2.8.7.1, which is in
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/
My script has had in it these lines:

import wxversion
wxversion.select("2.8.7")

and has been running correctly.

Recently I installed 2.8.8.1. That installed itself in
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/

Things still run correctly (so long as I don't use wxversion).
2.8.8.1 is the default version. However, whether I try wxversion for
2.8.7.1 or 2.8.8.1 I get an importError. For example, from the
interpreter:

~ > python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
  

import wxversion
wxversion.select("2.8.7")
import wx
        

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
    from wx._core import *
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
    import _core_
ImportError: dlopen(/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
2): Library not loaded:
/usr/local/lib/wxPython-unicode-2.8.7.1/lib/libwx_macud-2.8.0.dylib
  Referenced from:
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so
  Reason: Incompatible library version: _core_.so requires version
5.0.0 or later, but libwx_macud-2.8.0.dylib provides version 2.6.0

~ > python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
  

import wxversion
wxversion.select("2.8.8")
import wx
        

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
    from wx._core import *
  File "/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
line 4, in <module>
    import _core_
ImportError: dlopen(/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
2): Library not loaded:
/usr/local/lib/wxPython-unicode-2.8.7.1/lib/libwx_macud-2.8.0.dylib
  Referenced from:
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so
  Reason: Incompatible library version: _core_.so requires version
5.0.0 or later, but libwx_macud-2.8.0.dylib provides version 2.6.0

What am I doing wrong? I need to have 2.8.7.1 accessible for a while longer.

Thanks,

Ian

Hi,

wxversion is working very, very well.

Unfortunatelly, the wxPython provider has decided to stamp all thede 2.8.* versions “2.8” which just
makes the wxversion mechanism useless.

Today, we have to live with 11 incompatible 2.8 versions (2.8.0.1 (11-Dec-2006), 2.8.1.0, 2.8.1.1,
2.8.3.0, 2.8.4.0, 2.8.4.2, 2.8.6.0, 2.8.6.1, 2.8.7.1, 2.8.8.0, 2.8.8.1 (18-July-2008)) without counting the ansi/unicode builds variants.

To come, according the wxwidgets-dev list, 2.8.9 and 2.8.10.

That’s life…

jmf

···

2008/9/9 Ian York iayork@iayork.com

I have several versions of wxpython on my computer (MacOS10.5.4, Intel

core 2 duo). I’ve been using 2.8.7.1, which is in

/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/

My script has had in it these lines:

import wxversion

wxversion.select(“2.8.7”)

and has been running correctly.

Recently I installed 2.8.8.1. That installed itself in

/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/

Things still run correctly (so long as I don’t use wxversion).

2.8.8.1 is the default version. However, whether I try wxversion for

2.8.7.1 or 2.8.8.1 I get an importError. For example, from the

interpreter:

Ian York wrote:

I have several versions of wxpython on my computer (MacOS10.5.4, Intel
core 2 duo). I've been using 2.8.7.1, which is in
/Library/Python/2.5/site-packages/wx-2.8-mac-unicode/
My script has had in it these lines:

import wxversion
wxversion.select("2.8.7")

and has been running correctly.

Recently I installed 2.8.8.1. That installed itself in
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/

Actually, that is not 2.8.8.1. Anything under /System is installed by Apple, so that would be the 2.8.4.0 release that Apple provided.

Things still run correctly (so long as I don't use wxversion).
2.8.8.1 is the default version. However, whether I try wxversion for
2.8.7.1 or 2.8.8.1 I get an importError.

I wondered how long it would take for this to come up. I changed how wxPython is installed so it would be possible to use the same wxPython installation from both Apple's system Python (on 10.5) and also from a user installed MacPython. I didn't think about multi-version situations however and so wxversion didn't get updated. (And I still haven't had time to do it, if anybody wants to work on a patch I'd appreciate it.)

···

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