Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python2.3 upgrade

Reply
Thread Tools

python2.3 upgrade

 
 
tudor
Guest
Posts: n/a
 
      12-13-2003
hello!
I had python 2.2.1 so I upgraded to python 2.3.2, but all my
applications using python (rh 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
 
Reply With Quote
 
 
 
 
Lawrence Oluyede
Guest
Posts: n/a
 
      12-13-2003
tudor <> writes:

> 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?

--
Lawrence "Rhymes" Oluyede
http://loluyede.blogspot.com
 
Reply With Quote
 
 
 
 
tudor
Guest
Posts: n/a
 
      12-13-2003
Lawrence Oluyede wrote:

> tudor <> writes:
>
>> 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?
>

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...
 
Reply With Quote
 
Lawrence Oluyede
Guest
Posts: n/a
 
      12-13-2003
tudor <> writes:

> 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.

--
Lawrence "Rhymes" Oluyede
http://loluyede.blogspot.com
 
Reply With Quote
 
Lee Harr
Guest
Posts: n/a
 
      12-14-2003
On 2003-12-13, tudor <> wrote:
> Lawrence Oluyede wrote:
>
>> tudor <> writes:
>>
>>> 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?
>>

> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco 837 upgrade IOS upgrade gone wrong cisconewbie Hardware 5 10-05-2008 06:29 PM
Upgrade vs Upgrade - not a faq but maybe some answers. Comments and Corrections welcomed. Agent86 Windows 64bit 2 02-09-2007 08:16 PM
Upgrade perl from 5.8.6 to 5.8.8 - help with upgrade ben.wilder@gmail.com Perl Misc 5 07-05-2006 11:19 AM
Keep an Eye Out for the PSP's Firmware Upgrade Silverstrand Front Page News 0 08-04-2005 01:03 AM
MN-700 Disconnects continue after Firmware upgrade JR Wireless Networking 0 08-24-2004 03:09 PM



Advertisments