Installing problems with python package on Mac OS

2019-08-16 02:58发布

I am a newbie to python (not to Mac OS X). I want to install a package (here: blink1) that seemed to be installed, but I cannot use it. Maybe this has to do with several versions on my Mac but still all solutions presented here do not work. Any help is appreciated.

I installed the package via 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...

and then running python gives

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

My syspath is as follows

['', '/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']

I am using Mac OS X 10.10.1.

标签: python macos
0条回答
登录 后发表回答