我已经在我的Mac Yosemite 10.10.5上使用PIP安装了pycrypto。我使用的是Python 2.7.10。
当我尝试运行from Crypto import Cipher
等代码时,会生成错误:
ImportError:无法导入名称密码
当我运行PIP SHOW PYCRYPTO时,我得到:
Metadata-Version: 2.0
Name: pycrypto
Version: 2.6.1
Summary: Cryptographic modules for Python.
Home-page: http://www.pycrypto.org/
Author: Dwayne C. Litzenberger
Author-email: dlitz@dlitz.net
License: UNKNOWN
Location: /Library/Python/2.7/site-packages
Requires:
我的SYS.PATH是:
['',' /Library/Python/2.7/site-packages/pip-8.0.2-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',& #39; /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',& #39; /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',' /Users/cameronmacintyre/Library/Python/2.7/lib/python/site-packages',& #39;在/ usr / local / lib目录/python2.7/site-packages' ;,' /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC' ;,' / Library / Python /2.7/site-packages']
我似乎也有命令行工具,包括gcc,它们位于/Library/Developer/CommandLineTools/usr/bin/
。