>>> import pynotify
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pynotify
>>>
我已经安装了 py-notify 模块。这是我在导入它时遇到的错误,我正在思考它。
我只是想知道这是否是路径的问题。当我打印出来时sys.path
,我得到了这个输出。有什么建议么?
>>> import sys
>>> for x in sys.path:
... print x
...
/usr/local/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/li b/python27.zip
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/site-packages
/usr/local/lib/python2.7/site-packages/gtk-2.0
/usr/local/lib/python2.7/site-packages/gtk-2.0
>>>