python2.3 upgrade

Discussion in 'Python' started by tudor, Dec 13, 2003.

  1. tudor

    tudor Guest

    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
    tudor, Dec 13, 2003
    #1
    1. Advertising

  2. 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
    Lawrence Oluyede, Dec 13, 2003
    #2
    1. Advertising

  3. tudor

    tudor Guest

    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...
    tudor, Dec 13, 2003
    #3
  4. 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
    Lawrence Oluyede, Dec 13, 2003
    #4
  5. tudor

    Lee Harr Guest

    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.
    Lee Harr, Dec 14, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier
    Replies:
    0
    Views:
    416
    Xavier
    Aug 6, 2003
  2. Skip Montanaro
    Replies:
    1
    Views:
    430
    Thomas Heller
    Aug 7, 2003
  3. snacktime
    Replies:
    13
    Views:
    559
    Dan Sommers
    Feb 22, 2005
  4. Uwe Mayer

    changing from python2.3 to python2.4

    Uwe Mayer, Apr 8, 2005, in forum: Python
    Replies:
    1
    Views:
    301
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 9, 2005
  5. Ksenia Marasanova
    Replies:
    2
    Views:
    352
    Mike Meyer
    Nov 17, 2005
Loading...

Share This Page