在Mac OS X上安装python包的问题(可能是几个python版本)

时间:2015-01-24 11:12:43

标签: python macos

我是python的新手(不是Mac OS X)。我想安装一个似乎已安装的软件包(此处:blink1),但我无法使用它。也许这与我的Mac上的几个版本有关,但这里提供的所有解决方案仍然不起作用。任何帮助表示赞赏。

我通过pip安装了包:

sudo pip install blink1
Requirement already satisfied (use --upgrade to upgrade): blink1 in     /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): pyusb>=1.0.0b1 in  /Library/Python/2.7/site-packages/pyusb-1.0.0b1-py2.7.egg (from blink1)
Requirement already satisfied (use --upgrade to upgrade): click in /Library/Python/2.7/site-packages (from blink1)
Requirement already satisfied (use --upgrade to upgrade): webcolors in /Library/Python/2.7/site-packages (from blink1)
Cleaning up...

然后运行python给出

Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
>>> from blink1.blink1 import blink1
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named blink1.blink1

我的syspath如下

['', '/Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg',     
'/Library/Python/2.7/site-packages/pyusb-1.0.0b1-py2.7.egg',   
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',  
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- darwin', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
'/Library/Python/2.7/site-packages']

我使用的是Mac OS X 10.10.1。

0 个答案:

没有答案