2

could someone help me? This guide dosent work: PyCrypto on python 3.5

Commandline:

creating build\temp.win32-3.6\Release\src
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -IC:\Python36-32\include -IC:\Python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" /Tcsrc/winrand.c /Fobuild\temp.win32-3.6\Release\src/winrand.obj
  winrand.c
  C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt\inttypes.h(26): error C2061: syntax error: identifier 'intmax_t'

C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier 'rem'
  C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt\inttypes.h(27): error C2059: syntax error: ';'

C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt\inttypes.h(28): error C2059: syntax error: '}'

C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt\inttypes.h(30): error C2061: syntax error: identifier 'imaxdiv_t'


  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for pycrypto

  Running setup.py clean for pycrypto
Failed to build pycrypto

Installing collected packages: pycrypto
  Running setup.py install for pycrypto ... error

 warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

    ----------------------------------------
Command "C:\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\CHRIST~1\\AppData\\Local\\Temp\\pip-build-1hsm_c69\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\CHRIST~1\AppData\Local\Temp\pip-wl7h4k32-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\CHRIST~1\AppData\Local\Temp\pip-build-1hsm_c69\pycrypto\

Is there any way how to install PyCrypto? Visual Studio 2015 is installed; Should I set environment variables for visual studio?

toti08
  • 2,448
  • 5
  • 24
  • 36
Ni Do
  • 21
  • 1
  • 3

2 Answers2

2

your python version is 3.6,that's why of you can run this error.you need change python3.5,properly is 3.5.2. i think you can success to import.

Gaya Yang
  • 21
  • 3
1

Try installing the Microsoft Visual C++ Compiler for Python for the version you are using. This link is for version 2.7. Find and download yours. I'm sure it will help!

  • Welcome to Stack Overflow! While links are great way of sharing knowledge, they won't really answer the question if they get broken in the future. Add to your answer the essential content of the link which answers the question. In case the content is too complex or too big to fit here, describe the general idea of the proposed solution. Remember to always keep a link reference to the original solution's website. See: [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer) – sɐunıɔןɐqɐp Sep 20 '18 at 06:26