1. 程式人生 > >python3.6 windows 安裝pycrypto踩坑

python3.6 windows 安裝pycrypto踩坑

環境:windows,python3.6
安裝中報錯:
GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

安裝Visual Studio 2015

VS2015安裝

新增環境變數

注意一定是新增使用者變數,不是系統變數
環境變數

CMD安裝

注意一定使用cmd,不要使用power shell,如果之前已經開啟cmd了,請關閉後重新開啟
先執行一下命令

set CL=/FI”%VCINSTALLDIR%\INCLUDE\stdint.h” %CL% 

然後使用pip install安裝whl檔案或者python setup.py install 進行原始碼安裝