473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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_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
Jul 18 '05 #1
4 1803
tudor <tu********@tin.it> 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
Jul 18 '05 #2
Lawrence Oluyede wrote:
tudor <tu********@tin.it> 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...
Jul 18 '05 #3
tudor <tu*********@tin.it> 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
Jul 18 '05 #4
On 2003-12-13, tudor <tu*********@tin.it> wrote:
Lawrence Oluyede wrote:
tudor <tu********@tin.it> 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.

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jakub Moscicki | last post by:
Hello, A small problem: I get a signal during a system call (from xmlrpclib -> httplib) and an exception "IOError: Interrupted system call" is raised (this is system dependant, on other machine...
3
by: Adil Hasan | last post by:
Hello, I'm having problems trying to use ZSI to connect to a https url. I give the command and I get prompted for my X509 cert pass-phrase, but the program dies with an openssl error. Here's my...
1
by: km | last post by:
Hi all, is there a debian binary of python2.4 ? tia, KM
6
by: Miernik | last post by:
On my Debian GNU/Linux system I have Python 2.3 installed in /usr/lib/python2.3/ where most Python system files like /usr/lib/python2.3/gzip.py /usr/lib/python2.3/gzip.pyc...
4
by: Ksenia Marasanova | last post by:
Hi, I have python2.3, installed from port /lang/python long time ago. The current version is 2.4, but I'd rather have two python versions, instead of upgrading. Is there maybe a way to somehow...
15
by: Christopher Taylor | last post by:
RHEL comes with Python2.3 installed. A program I need to install requires Python2.4 So I got Python2.4 from source and compiled it up. I configured it with --prefix=/usr --exec-prefix=/usr...
6
by: samn | last post by:
i compiled and installed the release version of python 2.5 for linux to a directory accessible to 2 computers, configured with --prefix=/usr/arch (which is accessible to both machines). the...
4
by: Helmut Jarausch | last post by:
Hi, I'd like to install a package ('rekall') which uses frame->f_nlocals which is no longer contained in frameobject.h What's the recommended way to upgrade such an application? Many...
0
by: VISHAL KANAUJIA | last post by:
Hi all, I am new member of this post. I have a C application which uses Python(version 2.3) extensively with SWIG wrappers. I want to upgrade the Python to latest version2.5. Is there any...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.