No module named Crypto--转
生活随笔
收集整理的这篇文章主要介绍了
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:\Python27\Lib\site-packages\crypto
to: C:\Python27\Lib\site-packages\Crypto
翻译过来就是:
把crypto文件夹重命名为Crypto。
终于可以正常使用了。
转载于:https://www.cnblogs.com/davidwang456/p/9371630.html
总结
以上是生活随笔为你收集整理的No module named Crypto--转的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 2000万日订单背后:美团外卖客户端高可
- 下一篇: redis中的事务、lua脚本和管道的使