sudo update-alternatives does not configure the default python-wxgtk in Jaunty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wxwidgets2.6 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
wxwidgets2.8 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In Jaunty, when both python-wxgtk2.6 and python-wxgtk2.8 are installed, this happens by default:
>>> import wx
>>> wx.VERSION
(2, 6, 3, 2, '')
In Intrepid, this happens by default:
>>> import wx
>>> wx.VERSION
(2, 8, 8, 0, '')
This switch might be unexpected by programs which run fine under intrepid and depend on 2.8. (In the ideal scenario they should choose the right version with wxversion.)
Moreover in Jaunty 2.8 seems to be configured as the default:
$ 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/
2 /usr/lib/
So with "update-
In Debian this looks right:
$ sudo update-alternatives --config wx.pth
There are 2 choices for the alternative wx.pth (providing /usr/lib/
Selection Path Priority Status
-------
* 0 /usr/lib/
1 /usr/lib/
2 /usr/lib/
When 2 is selected, wx 2.8 will be the default version (in Debian):
>>> import sys, wx
>>> print wx.VERSION
(2, 8, 7, 1, '')
>>> print sys.path
['', '/usr/lib/
In Jaunty if I look to wx.pth:
$ cat /usr/lib/
wx-2.8-gtk2-unicode
In Jaunty many wx*.pth are added in comparison to Intrepid (but this is probably irrelevant):
$ locate .pth | grep wx
/etc/alternativ
/etc/alternativ
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/share/
/usr/share/
/var/lib/
/var/lib/
In Intrepid this gives:
$ locate .pth | grep wx
/etc/alternativ
/etc/alternativ
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/var/lib/
/var/lib/
In Jaunty:
>>> import sys
>>> sys.path
['', '/usr/lib/
In Intrepid:
>>> import sys
>>> sys.path
['', '/usr/lib/
So in Jaunty both wx-2.6 and wx2.8 are added to the sys.path, while in Intrepid only wx-2.8 was present.
To me it seems like a bug that both wx 2.6 and 2.8 are in sys.path
See also this discussion on the wxpython users mailing list upstream: http://
Some wxpython programs are now showing bugs as they are not compatible anymore with wxpython2.6
If possible, it would be nice that in Jaunty (like in intrepid) wxPython 2.8 is the default if both 2.6 and 2.8 are installed. For sure sudo update-alternatives should work for wxpython, so that at least the user can configure it the default wxpython version.
summary: |
- since Jaunty python-wxgtk2.6 should not take priority by default over - python-wxgtk2.8 + not possible to switch between python-wxgtk2.6 or python-wxgtk2.8 as the + default wxPython in Jaunty |
description: | updated |
summary: |
- not possible to switch between python-wxgtk2.6 or python-wxgtk2.8 as the - default wxPython in Jaunty + sudo update-alternatives does not configure the default python-wxgtk in + Jaunty |
Changed in wxwidgets2.8 (Ubuntu): | |
status: | New → Confirmed |
Changed in wxwidgets2.8 (Ubuntu): | |
assignee: | nobody → Morten Kjeldgaard (mok0) |
Changed in wxwidgets2.6 (Ubuntu Lucid): | |
assignee: | nobody → Devid Antonio Filoni (d.filoni) |
status: | New → In Progress |
Changed in wxwidgets2.8 (Ubuntu Lucid): | |
assignee: | nobody → Devid Antonio Filoni (d.filoni) |
status: | New → In Progress |
Changed in wxwidgets2.8 (Ubuntu): | |
assignee: | Morten Kjeldgaard (mok0) → nobody |
Changed in wxwidgets2.8 (Ubuntu Lucid): | |
status: | Fix Committed → Fix Released |
The problem seems to be that wx-2.6- gtk2-unicode. pth and wx-2.8- gtk2-unicode. pth are present in /usr/lib/ python2. */dist- packages. Removing these two symlinks solves the issue. Probably this needs to be fixed in python- wxgtk.postinst