windows ERROR: Failed building wheel for pycrypto

created at 05-29-2022 views: 49


Windows will report an error when installing pycrypto.

Below are some errors

Collecting pycrypto
  Downloading (446 kB)
     |████████████████████████████████| 446 kB 344 kB/s
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto ( ... 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\\'"'"'; __file__='"'"'C:\\Users\\zm\\AppData\\Local\\Temp\\pip-install-trmr6taw\\pycrypto_e1aaae9b5afb410691bac391ddb2c59f\\'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\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):


  1. Go to the 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"
  4. Just install it (I installed it in the env of anaconda, so enter the env first)
pip install pycrypto
created at:05-29-2022
edited at: 05-29-2022: