pip install XX报错ERROR: Command errored out with exit status 1:

安装python27第三方库pycaypto时报错,错误信息:

Running setup.py install for pycrypto ... error

    ERROR: Command errored out with exit status 1:

    command: 'E:\Python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\80786\\appdata\\local\\temp\\pip-install-3bxsnu\\pycrypto\\setup.py'"'"'; __file__='"'"'c:\\users\\80786\\appdata\\local\\temp\\pip-install-3bxsnu\\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\80786\appdata\local\temp\pip-record-tknyo2\install-record.txt' --single-version-externally-managed --compile

        cwd: c:\users\80786\appdata\local\temp\pip-install-3bxsnu\pycrypto\

    Complete output (150 lines):

   ......................................................

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

    building 'Crypto.Random.OSRNG.winrandom' extension

    error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

    ----------------------------------------

ERROR: Command errored out with exit status 1: 'E:\Python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\80786\\appdata\\local\\temp\\pip-install-3bxsnu\\pycrypto\\setup.py'"'"'; __file__='"'"'c:\\users\\80786\\appdata\\local\\temp\\pip-install-3bxsnu\\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\80786\appdata\local\temp\pip-record-tknyo2\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

----------------------------------------------------end-------------------------------------------------------------------------------

错误信息中,提示需要安装Microsoft Visual C++ 9.0,进入http://aka.ms/vcpython27,下载VCForPython27.msi安装后,再pip install 包即可成功安装

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容