安装vs相关工具之后继续报错:
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. building ‘Crypto.Random.OSRNG.winrandom‘ extension C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -IC:\Python36\include -IC:\Python36\include winrand.c C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(26): error C2061: syntax error: identifier ‘intmax_t‘ C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier ‘rem‘ C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2059: syntax error: ‘;‘ C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(28): error C2059: syntax error: ‘}‘ C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2061: syntax error: identifier ‘imaxdiv_t‘ C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2059: syntax error: ‘;‘ |
为了解决这个问题需要按照下面的步骤进行处理:
1.添加用户环境变量
2. 重新运行cmd,激活virtual-env,执行
set CL=/FI"%VCINSTALLDIR%\\INCLUDE\\stdint.h" %CL% |
然后再次安装即可。
注意不需要在pycharm中进行安装,会失败!注意不需要在pycharm中进行安装,会失败!注意不需要在pycharm中进行安装,会失败!
原创文章,转载请注明: 转载自 obaby@mars
本文标题: 《python3.7 安装alipay-sdk-python(PyCrypto)》
本文链接地址: http://h4ck.org.cn/2020/03/python3-7-%e5%ae%89%e8%a3%85alipay-sdk-pythonpycrypto/