pip install pycrypto
works fine with python3.5.2 but fails wiht python3.6 with the following error:
inttypes.h(26): error C2061: syntax error: identifier 'intmax_t'
pip install pycrypto
works fine with python3.5.2 but fails wiht python3.6 with the following error:
inttypes.h(26): error C2061: syntax error: identifier 'intmax_t'
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:
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.
I've succeeded install pycrypto 2.6.1 on python 3.6, Windows 10, Visual Studio 2017.
Use PyCrytodome instead of pycryto. Pycryto is discontinued and is no longer actively supported.
I've succeeded install pycrypo 2.6.1 on python 3.6 and windows 10.
set CL=/FI"%VCINSTALLDIR%\\INCLUDE\\stdint.h" %CL%
python setup.py install
I would be glad if this could be help someone.