Microsoft Windows Python-3.6 PyCrypto installation error

后端 未结 8 2111
陌清茗
陌清茗 2020-11-29 00:30

pip install pycrypto works fine with python3.5.2 but fails wiht python3.6 with the following error:

inttypes.h(26): error C2061: syntax e

8条回答
  •  渐次进展
    2020-11-29 01:13

    The file include\pyport.h in Python installation directory does not have #include < stdint.h > anymore. This leaves intmax_t undefined.

    A workaround for Microsoft VC compiler is to force include stdint.h via OS environment variable CL:

    1. Open command prompt
    2. Setup VC environment by runing vcvars*.bat (choose file name depending on VC version and architecture)
    3. set CL=-FI"Full-Path\stdint.h" (use real value for Full-Path for the environment)
    4. pip install pycrypto

提交回复
热议问题