no module named crypto.cipher

2020-06-01 08:03发布

I'm trying my hands on encryption for a while now. I recently got hands on this python based crypter named PythonCrypter.

I'm fairly new to Python and when I try to open the CodeSection.py file via terminal, I get error saying from Crypto.Cipher import AES ImportError: No Module Named Crypto.Cipher

What am I doing wrong?

9条回答
Melony?
2楼-- · 2020-06-01 08:33

In my case, pycrypto package was not installed, when I tried to add it: I ran into the following error which was rectified by downloading and installing C++ Compiler for Python 2.7.

error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

查看更多
做个烂人
3楼-- · 2020-06-01 08:45

In order to use the pycypto library you should install it with:

pip install pycrypto

or

easy_install pycrypto
查看更多
Emotional °昔
4楼-- · 2020-06-01 08:48

I just spent half an hour figuring this out on Ubuntu. Turns out, I had installed the python-pycryptopp package through apt (I prefer to avoid pip if possible), but the package I needed was actually python-crypto.

查看更多
登录 后发表回答