LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Yoper
User Name
Password
Yoper This forum is for the discussion of Yoper Linux.

Notices


Reply
  Search this Thread
Old 01-09-2005, 08:12 PM   #1
psteege
LQ Newbie
 
Registered: May 2002
Location: Warrenton, VA USA
Posts: 13

Rep: Reputation: 0
Problem with IcePref


I loaded icepref but when I run it the following error is seen:

icewm $ which icepref
/usr/X11R6/bin/icepref
icewm $ icepref
Traceback (most recent call last):
File "./icepref.py", line 39, in ?
import glob,gtk,GTK,re,sys,os,commands,GdkImlib,math
ImportError: No module named GTK

I have python installed:
icewm $ rpm -qa|grep python
python-2.3.0-1

Can some python person tell me what these import errors mean ?

Here is what line 39 looks like in the /usr/X11R6/bin/icepref file:

34 ##########################################################
35
36 from gtk import *
37 from string import *
38
39 import glob,gtk,GTK,re,sys,os,commands,GdkImlib,math
40
41 ########################################################################
 
Old 01-10-2005, 09:44 AM   #2
rksprst
Member
 
Registered: Jan 2004
Distribution: OS X 10.4
Posts: 172
Blog Entries: 1

Rep: Reputation: 30
Quote:
ImportError: No module named GTK
I get the same error, just posting so i get subscribed to the thread
 
Old 04-02-2005, 06:45 PM   #3
ruben0076
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Rep: Reputation: 0
also just subscribing i have same problem
 
Old 04-18-2005, 02:14 AM   #4
LiquidPenguin
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 8.0
Posts: 2

Rep: Reputation: 0
Hey. I found this during a Google search and I'm just replying in case anybody is still subscribed to this. If not, then at least, this information is here for the next person who comes along.

Information:
I have the following software installed.
Debian Sarge Kernel 2.6.8-2-k7 (Yes, I know it's not Yoper, keep reading)
Python 2.3
libgtk2.0. Somehow, libgtk1.2 got installed in some patch or another. So it appears I have both.
KDE 3.3.2

The problem software I was having was with BitTorrent 4.0.1.

Whenever I attempted to launch btdownloadgui.py, I would receive the following error:

Code:
btdownloadgui.py
Traceback (most recent call last):
  File "/usr/bin/btdownloadgui.py", line 27, in ?
    import gtk
ImportError: No module named gtk
What I did to resolve this:

Obviously, I'm missing something crucial here. I have Python and I have GTK, so why can't either one find each other? I really wanted these two to meet and spawn little children. So I started with Google. No direct answers, but I did find a few hints from as far back as 2002-3. Clearly, I needed to introduce GTK to Python. So I needed a library.

After a lot of fiddling with
Code:
apt-cache search
I finally came across an interesting Debian packages with their descriptions.

python2.3-glade2 - GTK+ bindings: Glade support
python2.3-gtk2 - Python bindings for the GTK+ widget set

OK, this and their corresponding 1.2 looked like the kind of toys I needed to get Mr. Python to meet Miss. GTK.

To cut to the chase, a simple
Code:
apt-get install python-glade2
will introduce
python2.3-glade2, python2.3-gtk2, and python2.3-numeric
into the mix. Then I went back and tried to run btdownloadgui.py and voila! Python and GTK meet and they're now happily playing.

Wrap up
Point is, it looks like there's a missing Python library for GTK. I think you need to install this library to resolve the problem. Since I'm using Debian, some of these versions might be slightly behind the main branches. And you'll have to figure it out what the package names are for other distros like Yoper or RedHat.

But I'm leaving this here in the hopes that the next person who searches for a solution will find the clues they need from this post.

Happy Trails

Last edited by LiquidPenguin; 04-18-2005 at 02:19 AM.
 
Old 10-20-2005, 11:06 PM   #5
torzsmokus
LQ Newbie
 
Registered: Oct 2005
Location: Budapest, Hungary
Distribution: UHU Linux (uhulinux.hu)
Posts: 4

Rep: Reputation: 0
Lightbulb a simple solution for 'import gtk' error

use python2.3! it'll work.
(you can type 'python2.3 foo.py' instead of 'python foo.py'!)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IceWM-Icepref Dapper Dan Linux - Software 2 10-25-2003 09:33 AM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 08:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Yoper

All times are GMT -5. The time now is 05:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration