Comment 4 for bug 948944

Revision history for this message
Éric Piel (pieleric) wrote : Re: after upgrade from oneiric python applications may use the wrong version of wxpython and fail as a result

I noticed the same problem and removed python-wxgtk2.6 hoping it'd fix it, but then python cannot find any "wx" module at all!

Apparently it's a problem with the alternatives: python-wxgtk2.6 provides wx2.7.pth (where 2.7 stands for the _python_ version) and python-wxgtk2.8 provides wx.pth (no version here at all). So with python-wxgtk2.6 and python-wxgtk2.8 installed you get this:

$ head /var/lib/dpkg/alternatives/wx*
==> /var/lib/dpkg/alternatives/wx2.7.pth <==
auto
/usr/lib/python2.7/dist-packages/wx.pth

/usr/lib/wx/python/wx2.6.pth
26

==> /var/lib/dpkg/alternatives/wx.pth <==
auto
/usr/lib/wx/python/wx.pth

/usr/lib/wx/python/wx2.8.pth
28

============================

/usr/lib/python2.7/dist-packages/ is actually the place where python look for the modules. So python-wxgtk2.8 gets kicked out by python-wxgtk2.6 .

There is obviously something wrong, as the 2 packages should provide alternatives to the same thing. Maybe making python-wxgtk2.8 an alternative for wx2.7.pth (/usr/lib/python2.7/dist-packages/wx.pth) instead of wx.pth is the most compatible way?

Note, as a workaround here is how I get python-wxgtk2.8 seen by python:
sudo apt-get remove python-wxgtk2.6
sudo ln -s /usr/lib/wx/python/wx.pth /usr/lib/python2.7/dist-packages/wx.pth