Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printtool doesn''t work with python 2.2 (RH 7.1)

Status
Not open for further replies.

Alainovitch

Programmer
Apr 5, 2002
7
FR
I have installed RH 7.1 then python 2.2 (Rebuilt from the SRPM on python site)
but some problems occured when executing printool :
cannot import gtk, gnome.ui, libglade.
Then i installed tkinter but nothing more, it is still impossible to import gtk, ...
I tried with python 1.5 and everthing works correctly.
Is there any problems between python 2.2 and printtool ??
Naturally i really need python 2.2 ...
What should i add to the python 2.2 installation for printtol to works correctly
Than you for your help
 
Hi,

You would also need the following rpms :

pygtk
pygnome
pygtk-libglade

In fact, for simplicity, its probably easiest to install all the rpms beginning with py as none of them are very big.

However, if the import fails for 2.2 but works for 1.5 that would indicate that the libraries are in the 'wrong' place. It does look as though even the current rpms place the code in /usr/lib/python1.5 . So, you would need your sys.path to include those directories - e.g. via the PYTHONPATH environment variable.

import sys
print sys.path


Regards
 
Thank you for your advise but infortunately it doesn't work properly.
the sys.path was OK then.
I have downloaded pygtk (pygtk-0.6.8-3.i386.rpm), pygnome (pygnome-1.4.1-3.i386.rpm), and pygtk-libglade (pygtk-libglade-0.6.6-7.i386.rpm) then i uninstalled python1.5, 2.2 and everything related to them.
I reinstalled only python 2.2 (python2-2.2-2.src.rpm), tkinter (python2-tkinter-2.2-2.i386.rpm) then i installed the pytgk, pygnome, pygtk-libglade and during the installation a directory lib/python1.5 was created and gtk, gnome ...etc were installed in it (obviously i had exectly the same behavior with import gtk since i launched python2.2 which point on python2.2 directory).
I presumed the versions i downloaded are python1.5 compatible but i can figure out where to find pygtk, pygnome, and pygtk-libglade for python2.2.

Once again thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top