No module named Crypto--转

https://blog.csdn.net/lacoucou/article/details/53152122

背景:win10+python 2.7
在python 中使用AES算法时,会报告上述错误,原因是Crypto并非标准模块,需要自己单独安装。
安装方法:

1.pip install pycropt 这中办法经常会报错:

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27

似乎也很麻烦。

2.使用编译好的安装包。下载地址:

  [pycropt](http://www.voidspace.org.uk/python/modules.shtml#pycrypto)

根据自己的版本现在对应的安装即可。

然而,安装完,或许并没有什么卵用,使用依旧报错:

No module named Crypto.Cipher

经过苦苦搜索,终于在stackover上找到答案: 
打开链接之后请拉到最后一条回答

I found the solution. Issue is probably in case sensitivity (on Windows). 
Just change the name of the folder: 
C:Python27Libsite-packagescrypto 
to: C:Python27Libsite-packagesCrypto

翻译过来就是: 
把crypto文件夹重命名为Crypto。 
终于可以正常使用了。

原文地址:https://www.cnblogs.com/davidwang456/p/9371630.html