On Sat, Dec 28, 2002 at 10:50:32PM +0100, Martijn Brouwer wrote:
> I have two versions of python installed (2.1 and 2.2) on a linux system running
>debian testing. For 2.1 I have PyGtk installed using the packages from the
>distribution, which works fine. Now I want to write a program myself using PyGtk and
>Gnome-Python version 1.99.13. Both are now installed in
>/home/martijn/sys/lib/python2.2/sitepackages. The listing of this directory looks
>like everything is OK.
> drwxr-xr-x 5 martijn users 4096 Dec 27 16:08 gtk-2.0
> -rw-r--r-- 1 martijn users 8 Dec 26 23:12 pygtk.pth
> -rw-r--r-- 1 martijn users 2092 Dec 26 23:12 pygtk.py
> -rw-r--r-- 1 martijn users 1841 Dec 26 23:12 pygtk.pyc
> -rw-r--r-- 1 martijn users 1504 Dec 26 23:12 pygtk.pyo
>
> Yet, when I export PYTHONPATH=/home/martijn/sys/lib/python2.2/sitepackages and start
>the python interpreter (2.2) I cannot import gtk:
^^^^
You mean
site-packages,
right?
> ImportError: No module named gtk
>
> What is missing? sys.path is
I guess you forgot to
import pygtk
pygtk.require("2.0")
before "import gtk"
--
Tom Cato Amundsen <[EMAIL PROTECTED]>
GNU Solfege - free eartraining, http://www.gnu.org/software/solfege/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/