pip 安装pycrypto神坑

By 肖奈
2018-09-05
4297 read

1. 解决no vc ++

下载安装(http://pan.baidu.com/s/1eSueWLG)

2. 解决building ‘Crypto.Random.OSRNG.winrandom‘ extension

I. 添加VC环境变量,设置用户环境变量,这里划重点!!!是用户环境变量,不是系统环境变量
II. 变量名:VCINSTALLDIR(变量值为vs安装路径下的VC,默认是这个)
变量值:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
III. win+R管理员运行cmd,执行命令
set CL=/FI"%VCINSTALLDIR%\INCLUDE\stdint.h" %CL%
参考https://blog.csdn.net/a624806998/article/details/78596543

3. 解决Windows Kits\10\include\10.0.22000.0\ucrt\inttypes.h(31): error C2061: 语法错误: 标识符“intmax_t”

QQ截图20211016205758.png
I. 将 D:\Program Files\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include(visul studio的安装目录)下的 stdint.h 复制到C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt(windows kits目录)
II. 将(windows kits目录下)inttypes.h文件内14行尖括号修改为双引号

III. 重装pycrypto
pip install pycrypto

4. 解决ModuleNotFoundError: No module named ‘Crypto’

安装好了,结果发现报错ModuleNotFoundError: No module named 'Crypto',那么,你应该是安装了crypto,只需要卸载crypyo、pycrypto,然后重新安装pycrypto即可

jq 与cookie的结合
pip 修改安装源 一劳永逸

Comments

暂无评论,还不快来坐沙发...

Leave a Reply