from Crypto.Cipher import AES from Crypto.Hash import MD5 from Crypto.Random import random import numpy as np
1、import的时候总是出错:from Crypto.Cipher import _AESDLL load failed 不是有效win32程序或者没有这包:
2、此时,你会采用pip install pycrypto进行安装,但是会包这个错误:
文章图片
3、解决办法:这个网站下载已经编译好的exe安装包,点击直接安装即可,亲测有效
http://www.voidspace.org.uk/python/modules.shtml#pycrypto
文章图片
方法二:Python3中进行了改变,再不会使用pycrypto这个包了,而是换成了pycryptodomex,所以只需要执行以下两个步骤就OK啦。最后,完美解决无法安装的问题。
【【python】完美解决pycrypto安装】pip install pycrypto#这个执行过得就不需要执行了哈。
pip install pycryptodomex