Why won't modules in pycrypto work?

I have installed pycrypto on my Mac Yosemite 10.10.5, using PIP. I'm using Python 2.7.10.

When I try to run code such as from Crypto import Cipher , it generates the error:

ImportError: cannot import name Cipher

When I run PIP SHOW PYCRYPTO, I get:

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: 

My SYS.PATH is:

['', '/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', '/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', '/Users/cameronmacintyre/Library/Python/2.7/lib/python/site-packages', '/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']

I also seem to have the command line tools, including gcc, which are located at /Library/Developer/CommandLineTools/usr/bin/ .

链接地址: http://www.djcxy.com/p/55276.html

上一篇: ImportError:无法导入名称QtGui或任何其他PyQt4模块

下一篇: 为什么pycrypto中的模块不能工作?