Tag Archives: Windows pycrypto Install Error

[Solved] Windows pycrypto Install Error: ERROR: Failed building wheel for pycrypto

Windows will report an error when installing pycrypto.

Here are some errors

Collecting pycrypto
  Downloading http://mirrors.aliyun.com/pypi/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446 kB)
     |████████████████████████████████| 446 kB 344 kB/s
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\ProgramData\Anaconda3\envs\d2t\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\zm\\AppData\\Local\\Temp\\pip-install-trmr6taw\\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\\setup.py'"'"'; __file__='"'"'C:\\Users\\zm\\AppData\\Local\\Temp\\pip-install-trmr6taw\\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\zm\AppData\Local\Temp\pip-wheel-egkss95d'
       cwd: C:\Users\zm\AppData\Local\Temp\pip-install-trmr6taw\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\
  Complete output (183 lines):

The solution is:

1. Enter VC directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC

2. Execute vcvarsall.bat

3. Execute set CL=-FI”%VCINSTALLDIR%\INCLUDE\stdint.h”

Install it (I install it in the env of anaconda, so I enter env first)

https://blog.csdn.net/zm274310577/article/details/124927922