Module Not Found For Import

If another forum is more appropriate for my question, please point me to
it.

   A python application I'd like to us requires pygtk. Version 2.8.6 of that
package is installed in /usr/lib/python2.4/site-packages, but trying to
build and install that application reports that pygtk is not installed.
Indeed, from the python interpreter, attempts to 'import pygtk' fail. I'm
stymied due to my inexperience with python.

   In /usr/lib/python2.4/site-packages/pygtk/ there are:
2.0/ gtk-2.0/ pygtk.pth pygtk.py pygtk.pyc pygtk.pyo

   I want to learn how to fix python's inability to locate this module for
import.

TIA,

Rich

···

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Rich Shepard wrote:

  If another forum is more appropriate for my question, please point me to
it.

  A python application I'd like to us requires pygtk. Version 2.8.6 of that
package is installed in /usr/lib/python2.4/site-packages, but trying to
build and install that application reports that pygtk is not installed.
Indeed, from the python interpreter, attempts to 'import pygtk' fail. I'm
stymied due to my inexperience with python.

  In /usr/lib/python2.4/site-packages/pygtk/ there are:
2.0/ gtk-2.0/ pygtk.pth pygtk.py pygtk.pyc pygtk.pyo

  I want to learn how to fix python's inability to locate this module for
import.

On my system gtk-2.0 and pygtk.* are in site-pacakges, not site-packages/pygtk. So perhaps whatever installed them on your system put them in the wrong place. One way to work around this would be to add /usr/lib/python2.4/site-packages/pygtk to your PYTHONPATH environment variable.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Well, Robin. It was the incorrect location that caused the problem. I had
already modified PYTHONPATH to no effect. But, moving everything in the
pygtk/ directory up one level fixed the problem.

   A pint of Terminator Stout raised in your honor.

Thanks,

Rich

···

On Mon, 21 Aug 2006, Robin Dunn wrote:

On my system gtk-2.0 and pygtk.* are in site-pacakges, not
site-packages/pygtk. So perhaps whatever installed them on your system
put them in the wrong place. One way to work around this would be to add
/usr/lib/python2.4/site-packages/pygtk to your PYTHONPATH environment
variable.

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863