在Windows中安装simpleCrypto和PyCrypto后......我收到此错误...
步骤如下: cd simplecryto / dist; python setup.py安装 cd 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:\Python34\lib\site-packages\simplecrypt\__init__.py", line 2, in <module>
from Crypto.Cipher import AES
ImportError: No module named 'Crypto'
答案 0 :(得分:0)
我必须通过安装程序而不是setup.py来安装模块。以下是安装程序的链接:http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe