ERROR: Failed building wheel for pycrypto

使用pip 安装依赖包时,遇到报错

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
----------------------------------------
ERROR: Failed building wheel for pycrypto

解决方法:

1、解决 Microsoft Visual C++ 9.0 is required.问题即可

下载并安装 VCForPython27.msi

下载地址:
链接:https://pan.baidu.com/s/1QPllxPIXsFsStjUBLtt66g
提取码:bthp

下载之后找到文件夹,双击文件即可安装

2、重新安装依赖包

pip install -r requirements.txt
posted on 2022-10-14 11:06  msugry  阅读(610)  评论(0)    收藏  举报