This used to work as expected in Ubuntu < 9.04...
Under Jaunty things are different, because every wxpython package adds a
wx-2.[68]-gtk2-unicode.pth to /usr/lib/python2.6/dist-packages, so - if
I understand it correctly - on a "import wx" Python chooses
alphabetically, thus the 2.6 version..
I worked around it by removing those .pth's and keeping a simple wx.pth
containing "wx-2.8-gtk2-unicode".
I don't know if there's an "official" way of doing it :)
Bye!
I would have expected that 2.8 would be the default, but of course
this is debatable. Is this intended behaviour? Is there a way to set
system wide the preference for 2.8 instead of 2.6? Robin, does Ubuntu
implement this differently from upstream wxpython?
Best regards,
Stani
--
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be
You're supposed to be able to use update-alternatives to switch between
which wx.pth file is installed in [site|dist]-packages, but if Ubuntu
has changed how that file is installed and managed then that feature is
probably broken.
--
Robin Dunn
Software Craftsman
http://wxPython.org
I think dirs in the PYTHONPATH env variable are put in the sys.path
before dirs specified in .pth files.
It should be something like:
sudo update-alternatives --set NAME DEST
Where NAME is some link in /etc/alternatives (used to be just wx.pth,
but now I think it is something like wx$PYVER.pth) and DEST is the file
that it should be linked to. My packages install the DEST files in
/usr/lib/wx/python$PYVER/wx$WXVER.pth. I'm not sure if the Ubuntu
packages follow the same pattern any more, or even if they are still
using update-alternatives for that .pth file. (And I don't have an
untweaked Ubuntu box handy to check.)
http://wiki.wxpython.org/MultiVersionInstalls
If you want to change the system wide default, I think you can edit
the wx.pth file.
Conrado
So probably Federico Fanton is right, although I would expect that
alphabetically wx.pth would preceed wx-2.6-gtk2-unicode.pth
alphabetically.
Is there a way to set this as a user instead of system-wide (which
requires root privileges)?
--
Well, very strange, if I do:
$ ls /etc/alternatives | grep wx
wx2.5.pth
wx2.6.pth
$ sudo update-alternatives --config wx2.6.pth
[sudo] password for stani:
Er zijn 2 alternatieven die 'wx2.6.pth' voorzien.
Selectie Alternatieven
-----------------------------------------------
*+ 1 /usr/lib/wx/python/wx2.8.pth
2 /usr/lib/wx/python/wx2.6.pth
It shows that 2.8 is already the default for wx2.6.pth
I noticed a bug, that in sys.path both 2.6 and 2.8 were present, so I
reported it here:
https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/379573