为什么我安装gtk& pygtk有自制软件,但是python仍然找不到它:
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
解决方法:
检查模块是否在您的python路径中.检查软件包的安装位置,并将其添加到bashrc中,
#.bashrc
PATH=$PATH:$HOME/bin:/opt/lib/python2.4/site-packages/psycopg2/:path_to_module
export PATH