在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即可。