Frank Millman wrote:
I have upgraded Python and wxPython on my Redhat 9 system. Previous versions
are Python 2.2.3 and wxPython 2.4.0.2, new versions are Python 2.3.3c1 and
wxPython 2.4.2.4. Something has gone wrong.
I've had similar problems the last couple times, and it wasn't too big a
deal to solve them. I don't remember exactly what I did. I'll try to
give you hints, however.
ImportError: libwx_gtkd-2.4.so: cannot open shared object file: No such file
or directory
you've probably got it, but not in the right place. You can either
re-install differently, or you might be able to just copy or link it to
the right place..more later.
When I installed Python, I did not want to overwrite the existing
installation, so following the instructions, I installed the new one like
so -
./configure
make
make altinstall
This puts the new version of Python in /usr/local/bin and /usr/local/lib,
leaving the original version in /usr/bin and /usr/lib. This seems to have
worked ok.
You don't need to install python2.3 in /usr/local in order to preserve
2.2. Those two can co-exist jsut fine in /user. You may have other
reasons to use /usr/local, but this isn't one of them. The only problem
is what "python" ends up being...you can't have two /usr/bin/python
obviously, but you can have usr/bin/python2.2 and usr/bin/python2.3, and
have /usr/bin/python link to one of those. ON RedHat, it's probably best
to have it link the the original RedHat python, as their config tool use
it. I really wish they would just put:
#!/usr/bin/python2.2 as the #! line on all their tools, and then there
wouldn't be any problem. (Have they done this for RedHat9? I havn't
checked). Anyway, the python version problem is easily solved (on Unix
and OS-X anyway) by using a #! line like the above in all your own
scripts.
you can even link /usr/local/bin/python to /usr/bin/python2.,3 if you
want, but I wouldn't recomend it..then behaviour depends on $PATH order,
which seems fragile to me.
I installed wxPython from wxPythonGTK-py2.3-2.4.2.4-1.i386rpm. Before
installing it, I ran rpm with the -l option to see where it would put the
files. I could see some files going to /usr/bin, and others to /usr/lib.
After reading the rpm man pages, I decided to install wxPython with the
following options - --relocate /usr/bin=/usr/local/bin --relocate
/usr/lib=/usr/local/lib. This seemed to work ok.
That should work, but it doesn't seem to. At least it hasn';t for me. I
suspect that all the files got re-located, but there is a hard coded
path in there somewhere. I suspose that should either be fixed, or the
rpm marked as not being re-locatable (I have no idea how, but I think
that can be done.)
I thought that I would be able to run the original Python from /usr/bin, and
it would automatically import the original wxPython, and I would be able to
run the new Python from /usr/local/bin, and it would automatically import
the new wxPython. However, not only do I get the above error message from
the new Python, I also get a similar error message if I try to run the
original one - the file name in the error message is libwx_gtk2ud-2.4.so, as
the previous version was compiled for GTK2.
I had exactly the same problem, on REdHat 7.2, on 9, I just put it in
/usr, and it all worked better, but I don't have a 2.2 version running
there.
I can probably fix the old version by reinstalling everything from scratch,
but I would prefer to understand what I have done wrong and fix it
correctly.
YOu do need to re-install. I suspect that the so got clobered. YOu can
have both functional, I do on RedHat 7.s (the machine I'm on now), and I
don't think there is a difference between systems that should matter.
What I'd try is find libwx_gtkd-2.4.so, and move it around until you
have wx working with Python2.34. Then re-install wxPython for 2.2. As a
hint, here is what I have on my system, where I have 2.2 installed in
/usr, and 2.3 in /usr/local/:
/usr/lib/libwx_gtk-2.3.so.1.0.0
/usr/lib/libwx_gtk-2.3.so.1
/usr/lib/libwx_gtk_gl-2.3.so.1
/usr/lib/libwx_gtk_gl-2.3.a
/usr/lib/libwx_gtk_gl-2.3.so
/usr/lib/libwx_gtk_gl-2.3.so.1.0.0
/usr/lib/wxPython-2.4.2.4/lib/libwx_gtkd-2.4.so.0.1.1
/usr/lib/wxPython-2.4.2.4/lib/libwx_gtkd-2.4.so
/usr/lib/wxPython-2.4.2.4/lib/libwx_gtkd_gl-2.4.so.0.1.1
/usr/local/lib/wxPython/lib/libwx_gtkd-2.4.so.0.0.0
/usr/local/lib/wxPython/lib/libwx_gtkd-2.4.so.0
/usr/local/lib/wxPython/lib/libwx_gtkd-2.4.so
/usr/local/lib/wxPython/lib/libwx_gtkd_gl-2.4.so.0.0.0
/usr/local/lib/wxPython/lib/libwx_gtkd_gl-2.4.so.0
/usr/local/lib/wxPython/lib/libwx_gtkd_gl-2.4.so
/usr/local/lib/libwx_gtk-2.4.so.0.0.0
/usr/local/lib/libwx_gtk-2.4.so.0
/usr/local/lib/libwx_gtk-2.4.so
Note that I have both the "regular" wxGTK and the one that came with
wxPython installed. Also, a bunch of those are soft links, in the usual
*nix tradition. Maybe this will give you a hint
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov