python2.3 upgrade

T

tudor

hello!
I had python 2.2.1 so I upgraded to python 2.3.2, but all my
applications using python (rh8) give errors now. I installed from src.rpm

Traceback (most recent call last):
File "/usr/sbin/redhat-switch-printer", line 84, in ?
main()
File "/usr/sbin/redhat-switch-printer", line 68, in main
from switchprinter_gui import mainDialog
File "/usr/share/redhat-switch-printer/switchprinter_gui.py", line
51, in ?
import gtk
ImportError: No module named gtk



Should I GO BACK TO 2.2.1?

Thanks
 
L

Lawrence Oluyede

tudor said:
Traceback (most recent call last):
File "/usr/sbin/redhat-switch-printer", line 84, in ?
main()
File "/usr/sbin/redhat-switch-printer", line 68, in main
from switchprinter_gui import mainDialog
File "/usr/share/redhat-switch-printer/switchprinter_gui.py", line 51,
in ?
import gtk
ImportError: No module named gtk

Have you reinstalled pygtk for the right python version?
 
T

tudor

Lawrence said:
Have you reinstalled pygtk for the right python version?
I have pygtk-1.99 which I guess is too old....
But I don't think I'm gonna find rpms for my rh8 of the new pygtk, so I'll
have to renew the whole gtk2 ! which kinda sounds scarry to me...
 
L

Lawrence Oluyede

tudor said:
I have pygtk-1.99 which I guess is too old....
But I don't think I'm gonna find rpms for my rh8 of the new pygtk, so I'll
have to renew the whole gtk2 ! which kinda sounds scarry to me...

I meant that you have to reinstall pygtk on the 2.3 distro... maybe
you let it on the old one.
 
L

Lee Harr

I have pygtk-1.99 which I guess is too old....
But I don't think I'm gonna find rpms for my rh8 of the new pygtk, so I'll
have to renew the whole gtk2 ! which kinda sounds scarry to me...


I see 2 possibilities.

Often, when "upgrading" python, what you really do is just install a new
version, and the old version is still there.

Try something like ...

ls -l /usr/local/bin/py*

and see if you get ...

-r-xr-xr-x 2 root wheel 766652 Nov 21 03:53 /usr/local/bin/python
-r-xr-xr-x 1 root wheel 520908 Oct 14 20:03 /usr/local/bin/python2.1
-r-xr-xr-x 1 root wheel 657928 Sep 26 13:20 /usr/local/bin/python2.2
-r-xr-xr-x 2 root wheel 766652 Nov 21 03:53 /usr/local/bin/python2.3

(you may have to look around for where your python is)

If 2.2 is still there, but python is pointing to python2.3 you should
be able to get the old version working again by doing

rm /usr/local/bin/python
ln /usr/local/bin/python2.2 /usr/local/bin/python

Then when you want to run 2.3 for your own use, or for programs that
require 2.3 you will have to run it specifically as python2.3


The other option would be to just copy the packages from the old install
to the new one. Something along the lines of ...

cp -R /usr/local/lib/python2.2/site-packages/* /usr/local/lib/python2.3/site-packages


You will probably get warnings when programs start up, but it should work
at least until you get a chance to rebuild things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top