Sorry it's taken me so long to get back to you, and
many thanks for your responses so far, they have been very
helpful.
Unfortunately I'm coming to realize how much I have to learn about
package management in Linux, and Debian in particular. I’ve
begun to probe the documentation of apt. The man page for dpkg
contains a description of the process of installing a package, but
prefaces it with a remark that the description is wholly
inadequate. But I think that’s a basic question I need an
answer to. Exactly what does it mean to say that a package has
been “installed”? What files exist, what linkages exist, etc,
which are necessary and sufficient to say that a package is
“installed”? If the official documentation doesn’t say much more
than that it doesn’t answer that question, then where is the
answer to be found? If necessary, I’ll read the source code for
apt, but I’d hope that wouldn’t be the shortest route to take.
I don't want to burden you with the task of writing a full answer
to that question, but perhaps you will be so kind as to point me
to the right place to start learning.
***
I've searched my system for all files named wx.pth, and as far as
I can tell, they all specify that version 2.8 should be used. Yet
when I start up Python and enter “import wx” and then “help(wx)”
it tells me that the file for version 2.6 has been used. Any idea
why that could be happening?
Again, many thanks...
–
Steve Gadget Barnes
The following may help, it was run on Ubuntu :
~$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import wx
>>> wx.version()
' (gtk2-unicode)'
>>> wx.__file__
‘/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/init.pyc’
>>> exit()
So now we know exactly which wx we are currently using:
$ ls -l /usr/lib/wx/python/
total 8
-rw-r--r-- 1 root root 19 Nov 16 16:43 wx2.8.pth
-rw-r--r-- 1 root root 19 Jan 12 16:34 wx2.8.pth.orig
lrwxrwxrwx 1 root root 24 Apr 5 01:34 wx.pth ->
/etc/alternatives/wx.pth
Hmmm so wx.pth is a soft link to /etc/alternatives/wx.pth ..
$ ls -l /etc/alternatives/w*
:
:
lrwxrwxrwx 1 root root 60 Apr 5 01:25 /etc/alternatives/wx-config
→ /usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-release-2.8
lrwxrwxrwx 1 root root 28 Apr 5 01:34 /etc/alternatives/wx.pth
→ /usr/lib/wx/python/wx2.8.pth
So we are linked back to /usr/lib/wx/python/wx2.8.pth which we know
is an ordinary file:
$ cat /usr/lib/wx/python/wx2.8.pth
wx-2.8-gtk2-unicode
No so helpful but lets take a look at wx-config - a cat of
/usr/lib/x86_64-linux-gnu/wx/config/gtk2-unicode-release-2. 8 gives a
long script.
Now a little while back I downloaded and built wxPython 2.9.4.0,
(plus a patch), applied the patch and built the lot but didn’t run
sudo make install as I need to stick with 2.8.12.1 for work at the
moment but given that I downloaded to
~/Downloads/wxPython-src-2.9.4.0 I can use:
$ export PYTHONPATH=~/Downloads/wxPython-src-2.9.4.0/wxPython
$ export
LD_LIBRARY_PATH=~/Downloads/wxPython-src-2.9.4.0/wxPython/wxpy-bld/lib/
$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import wx
>>> wx.version()
'2.9.4.0 gtk2 (classic)'
>>> exit()
Yippee!