954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

ImportError: No module named gtk

Hi,

I am trying to run an application that is developed in python and compiled in python 2.5
I have upgraded fedora 10 to fedora 13
now i am trying to install that application and run it fedora 13 it gives me an
error
File "kb.py", line 8, in
ImportError: No module named gtk
But i have checked whether i installed pygtk through yum command but the terminal says
Package pygtk2-2.17.0-3.fc13.i686 already installed and latest version
Nothing to do

So it has latest version of pygtk but still its giving an error msg
File "kb.py", line 8, in
ImportError: No module named gtk

So kindly advice me any suggestions to run that exe .. to solve this error.

kumarantechie
Newbie Poster
8 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

If you have multiple installations of python of your machine (say 2.6 and 2.5) and you are running the program with python 2.5, you may have to install a version of pygtk for your python 2.5. See this entry in the pygtk FAQ http://faq.pygtk.org/index.py?req=show&file=faq01.010.htp

Gribouillis
Posting Maven
Moderator
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691
 

need to build pygtk for the other python installations ..
how to install pygtk for python if i have multiple version of python like 2.5 , 2.6
is that means i have to separately download pygtk for python 2.5 and install it.. ??
Kindly need suggestions ...

kumarantechie
Newbie Poster
8 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 
need to build pygtk for the other python installations .. how to install pygtk for python if i have multiple version of python like 2.5 , 2.6 is that means i have to separately download pygtk for python 2.5 and install it.. ?? Kindly need suggestions ...

Yes I think you should try and download pygtk source and build it for python 2.5. It may work without problems. If your python is in /usr/local, you should probably use

env PYTHON=/usr/local/bin/python2.5 ./configure --prefix=/usr/local
make
sudo make install
Gribouillis
Posting Maven
Moderator
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691
 

Hi,

Thanks for the solution it comes very helpful and handy to me..
I appreciate your timely reply that save me much time .
thanks a lot ..

kumarantechie
Newbie Poster
8 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: