在windows 下使用pip 安装pycrypto 时报错:
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
试过了网上的各种解决方案,都不可行,无奈只好放弃。
最后参考了照片文字的方法顺利解决了问题 https://blog.csdn.net/five3/article/details/86160683
直接 pip install pycryptodome,并找到路径 C:\Users\administrator\AppData\Local\Programs\Python\Python37\Lib\site-packages下的crypto目录,将小写c改成大写C就可以了(为了兼容之前引用的Crypto.***)。或者把代码中的引用Crypto 改成crypto即可。