Microsoft Windows Python-3.6 PyCrypto installation error

后端 未结 8 2112
陌清茗
陌清茗 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:08

    Thanks to user1960422's answer.
    PowerShell steps for pycrypto 2.6.1 (via simple-crypt) / Python 3.6 / Windows 10:

    $env:VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
    $env:CL="-FI`"$env:VCINSTALLDIR\INCLUDE\stdint.h`""
    

    Successful simple-crypt / pycrypto install

    I also needed to follow the answer in: https://stackoverflow.com/a/24822876/8751739 to fix a winrandom module error.

提交回复
热议问题