no module named gtk
17,012
Solution 1
The libraries are not in the PYTHONPATH. I'd try:
$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages
Solution 2
Check if the module is in your python path. Check where you have installed the package and Add this in your bashrc,
#.bashrc
PATH=$PATH:$HOME/bin:/opt/lib/python2.4/site-packages/psycopg2/:path_to_module
export PATH
Author by
Alfred
I am a programmer and interested in algorithms and software and system design.
Updated on June 04, 2022Comments
-
Alfred almost 2 years
Why I install gtk & pygtk with homebrew, but python still not able to find it:
brew test -v pygtk Testing pygtk ==> chmod +x test.py chmod +x test.py ==> ./test.py ./test.py Traceback (most recent call last): File "./test.py", line 2, in <module> import pygtk ImportError: No module named pygtk Error: pygtk: failed