[Bug 15484] New: pygtk module not found, PYTHONPATH needs fixing
bugzilla-daemon at bugzilla.ubuntu.com
bugzilla-daemon at bugzilla.ubuntu.com
Thu Sep 15 11:15:12 UTC 2005
Please do not reply to this email. You can add comments at
http://bugzilla.ubuntu.com/show_bug.cgi?id=15484
Ubuntu | python-gnome2
Summary: pygtk module not found, PYTHONPATH needs fixing
Product: Ubuntu
Version: unspecified
Platform: Other
OS/Version: other
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python-gnome2
AssignedTo: seb128 at ubuntu.com
ReportedBy: michael at endbracket.net
QAContact: desktop-bugs at lists.ubuntu.com
When trying to use a python program that depends on PyGTK, I get the following
exception.
% ./rbscrobbler.py
Traceback (most recent call last):
File "/opt/rbscrobbler-0.0.4/rbscrobbler.py", line 3, in ?
import pygtk; pygtk.require('2.0')
ImportError: No module named pygtk
If I try the PyGTK Hello World program from <http://live.gnome.org/PyGTK>, the
same problem occurs.
If I ignore the failed pygtk import with a try..except: pass, it then fails on
the next import, gtk.
I have all the Python modules installed that I think I should need, particularly:
python2.4-gtk2 2.8.0-0ubuntu2
python2.4-gnome2 2.12.0-0ubuntu1
There are files in /usr/lib/python2.4/site-packages including:
pygtk.pyo
pygtk.py
pygtk.pyc
pygtk.py.python2.4-gtk2
If I run the program with
% PYTHONPATH=/usr/lib/python2.4/site-packages /opt/rbscrobbler-0.0.4/rbscrobbler.py
it works.
There are many other similar threads on forums about rbscroller, smeg, and other
programs.
Surely python should be configured to find its modules by default.
--
Configure bugmail: http://bugzilla.ubuntu.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the desktop-bugs
mailing list