在windows中安装simpleCrypto和PyCrypto后…我得到这个错误…
步骤是:cd simplecryto/dist;Python setup.py installcd pycrypto/dist;Python setup.py install
test.py:
from simplecrypt import encrypt, decrypt
ciphertext = encrypt(password, 'my secret message')
plaintext = decrypt(password, ciphertext)
python test.py Traceback (most recent call last):
File "test.py", line 1, in <module>
from simplecrypt import encrypt, decrypt
File "C:Python34libsite-packagessimplecrypt__init__.py", line 2, in <module>
from Crypto.Cipher import AES
ImportError: No module named 'Crypto'
我必须通过安装程序而不是setup.py安装模块来解决这个问题。下面是安装程序的链接:http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe