[gobolinux-users] Gpodder doesn't find python module "gtk"

Jonas Karlsson jonka750 at student.liu.se
Tue Mar 25 02:26:03 NZDT 2008


On Mon, 24 Mar 2008 14:17:07 +0100, Daniele Maccari <gobo.users at gmail.com> wrote:

> Thomas Queste wrote:
>> Hello,
>>
>> After EyeD3, Gpodder is compiling fine.
>> But at runtime, Gpodder hangs as it cannot find python's module for Gtk
>> : "ImportError: No module named gtk".
>> I tried recompiling python and pygtk and I did a 'SymlinkProgram -f pygtk'
>>
>> --Complete output : -------------------------------------
>> tom at Gobo /]gpodder
>> Traceback (most recent call last):
>>    File "/System/Links/Executables/gpodder", line 155, in <module>
>>      sys.exit( main())
>>    File "/System/Links/Executables/gpodder", line 113, in main
>>      from gpodder import console
>>    File
>> "Programs/GPodder/0.11.0/lib/python2.5/site-packages/gpodder/console.py",
>> line 20, in <module>
>>      from gpodder import util
>>    File
>> "Programs/GPodder/0.11.0/lib/python2.5/site-packages/gpodder/util.py",
>> line 35, in <module>
>>      import gtk
>> ImportError: No module named gtk
>> ---------------------------------------------------------
>>
>> What should I look for ?
>>
>> Thanks,
>>
>> Thomas
>>
>>
> Afaik, you've got two choises:
>
> 1. edit the environment variable PYTHONPATH to contain the pygtk
> module's dir (it should be somewhere under
> /S/L/L/Python-<version>/site-packages)
>
PYTHONPATH shouldn't be set. .pth files should be enough, so try unsetting
PYTHONPATH if already set.

> 2. add it to the file named "pygtk.pth" which you can find under the
> same dir as above.
PyGTK recipe should have created the above file for you. It should reside
in /Programs/PyGTK/Current/lib/python-<version>/site-packages and have the
contents Daniele gave below. Also make sure that you have
/Programs/Python/Current/lib/python-<version>/site-packages/gobolinux.pth
and it contains references to site-packages in
/System/Links/Libraries/python-<version>.

> If you don't have it, just create it. Mine looks like
> this:
>
> /System/Links/Libraries/python2.5/site-packages/gtk-2.0/
> /System/Links/Libraries/python2.4/site-packages/gtk-2.0/
> /System/Links/Libraries/python2.3/site-packages/gtk-2.0/
>

You could also try to import gtk manually, just to see if it is an issue
with gpodder or a general issue with Python. Just type 'python' at the
prompt and in the python prompt you type 'import gtk'.

-- 
/Jonas

PS. While experimenting with this I made a recipe for gpodder, which I
commited. It should be available in the store soon.

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the gobolinux-users mailing list