Python3 pip安装插件报错:ERROR: Command errored out with exit status 1:command: 'd:\programfile_it\python_3

windows7 Python3 pip install XXX时报错:

    ERROR: Command errored out with exit status 1:
     command: 'd:\programfile_it\python_3.7.0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:
\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-3646ud0c\\bitarray\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~
1\\AppData\\Local\\Temp\\pip-install-3646ud0c\\bitarray\\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\ADMINI~1\AppData\Local\Temp\pip-record-gup3rkup\install-record.txt' --single-version-externally-manag
ed --compile --install-headers 'd:\programfile_it\python_3.7.0\Include\bitarray'
         cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-3646ud0c\bitarray\
    Complete output (13 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\bitarray
    copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.7\bitarray
    copying bitarray\test_util.py -> build\lib.win-amd64-3.7\bitarray
    copying bitarray\util.py -> build\lib.win-amd64-3.7\bitarray
    copying bitarray\__init__.py -> build\lib.win-amd64-3.7\bitarray
    running build_ext
    building 'bitarray._bitarray' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visu
alstudio.com/visual-cpp-build-tools

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\programfile_it\python_3.7.0\python.exe' -u -c 'import sys, setuptools
, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-3646ud0c\\bitarray\\setup.py'"'"';
 __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-3646ud0c\\bitarray\\setup.py'"'"';f=getattr(tokeni
ze, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __f
ile__, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-gup3rkup\install-record.txt'
--single-version-externally-managed --compile --install-headers 'd:\programfile_it\python_3.7.0\Include\bitarray' Check
the logs for full command output.

解决措施:

安装 Microsoft Visual C++ 14.0 即可解决此报错问题。

 

来源: https://blog.csdn.net/lgq1383296/article/details/104074138