FAQ Index - Search - Recent Changes - Everything - Add entry

<< Previous Entry | FAQ Entry 1.10 | Next Entry >>

1.10. I have multiple copies of python but pygtk only works with one of them!

Python stores all its extension modules in a directory $(prefix)/lib/pythonX.Y where X.Y is the major and minor version of the release. This is to guard against changes to the Python C API between releases. As with all other extension modules, one version must be compiled for each python version.

If you built pygtk for one copy of python on your system (or if you are using packages from your distribution), it will probably not be available on the others.

You will probably need to build pygtk for the other python installations. To do this, set the PYTHON environment variable to the full path of the alternative python before running pygtk's configure script. For example to build pygtk for the python 2.x distributed with Red Hat 7.x, do the following:

  PYTHON=/usr/bin/python2 ./configure --prefix=/usr
  make
  make install

PyGTK FAQ Wizard | PyGTK Homepage | Feedback to faq at pygtk.org