python2.3 upgrade

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tudor

    python2.3 upgrade

    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_g ui import mainDialog
    File "/usr/share/redhat-switch-printer/switchprinter_g ui.py", line
    51, in ?
    import gtk
    ImportError: No module named gtk



    Should I GO BACK TO 2.2.1?

    Thanks
  • Lawrence Oluyede

    #2
    Re: python2.3 upgrade

    tudor <tudor.tata@tin .it> writes:
    [color=blue]
    > 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_g ui import mainDialog
    > File "/usr/share/redhat-switch-printer/switchprinter_g ui.py", line 51,
    > in ?
    > import gtk
    > ImportError: No module named gtk[/color]

    Have you reinstalled pygtk for the right python version?

    --
    Lawrence "Rhymes" Oluyede
    Blogger ist ein Veröffentlichungs-Tool von Google, mit dem du ganz einfach deine Gedanken der Welt mitteilen kannst. Mit Blogger kannst du problemlos Texte, Fotos und Videos in deinem persönlichen Blog oder deinem Team-Blog veröffentlichen.

    Comment

    • tudor

      #3
      Re: python2.3 upgrade

      Lawrence Oluyede wrote:
      [color=blue]
      > tudor <tudor.tata@tin .it> writes:
      >[color=green]
      >> 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_g ui import mainDialog
      >> File "/usr/share/redhat-switch-printer/switchprinter_g ui.py", line 51,
      >> in ?
      >> import gtk
      >> ImportError: No module named gtk[/color]
      >
      > Have you reinstalled pygtk for the right python version?
      >[/color]
      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...

      Comment

      • Lawrence Oluyede

        #4
        Re: python2.3 upgrade

        tudor <tudor.tatar@ti n.it> writes:
        [color=blue]
        > 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...[/color]

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

        --
        Lawrence "Rhymes" Oluyede
        Blogger ist ein Veröffentlichungs-Tool von Google, mit dem du ganz einfach deine Gedanken der Welt mitteilen kannst. Mit Blogger kannst du problemlos Texte, Fotos und Videos in deinem persönlichen Blog oder deinem Team-Blog veröffentlichen.

        Comment

        • Lee Harr

          #5
          Re: python2.3 upgrade

          On 2003-12-13, tudor <tudor.tatar@ti n.it> wrote:[color=blue]
          > Lawrence Oluyede wrote:
          >[color=green]
          >> tudor <tudor.tata@tin .it> writes:
          >>[color=darkred]
          >>> 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_g ui import mainDialog
          >>> File "/usr/share/redhat-switch-printer/switchprinter_g ui.py", line 51,
          >>> in ?
          >>> import gtk
          >>> ImportError: No module named gtk[/color]
          >>
          >> Have you reinstalled pygtk for the right python version?
          >>[/color]
          > 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...[/color]


          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.

          Comment

          Working...