使用pip安装python插件的时候出现Microsoft Visual C++ 9.0缺失错误

使用pip安装python插件的时候出现Microsoft Visual C++ 9.0缺失错误

Running setup.py install for gevent
    building 'gevent.corecext' extension
    error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
   
Complete output from command C:\Python27\python.exe -c "import
setuptools,
tokenize;__file__='c:\\users\\hello\\appdata\\local\\temp\\pip_build_hello\\gevent\\setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record
c:\users\hello\appdata\local\temp\pip-okbpxc-record\install-record.txt
--single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win-amd64-2.7

creating build\lib.win-amd64-2.7\gevent

copying gevent\backdoor.py -> build\lib.win-amd64-2.7\gevent

copying gevent\baseserver.py -> build\lib.win-amd64-2.7\gevent

copying gevent\builtins.py -> build\lib.win-amd64-2.7\gevent

copying gevent\core.py -> build\lib.win-amd64-2.7\gevent

copying gevent\corecffi.py -> build\lib.win-amd64-2.7\gevent

copying gevent\coros.py -> build\lib.win-amd64-2.7\gevent

copying gevent\event.py -> build\lib.win-amd64-2.7\gevent

copying gevent\fileobject.py -> build\lib.win-amd64-2.7\gevent

copying gevent\greenlet.py -> build\lib.win-amd64-2.7\gevent

copying gevent\hub.py -> build\lib.win-amd64-2.7\gevent

copying gevent\local.py -> build\lib.win-amd64-2.7\gevent

copying gevent\lock.py -> build\lib.win-amd64-2.7\gevent

copying gevent\monkey.py -> build\lib.win-amd64-2.7\gevent

copying gevent\os.py -> build\lib.win-amd64-2.7\gevent

copying gevent\pool.py -> build\lib.win-amd64-2.7\gevent

copying gevent\pywsgi.py -> build\lib.win-amd64-2.7\gevent

copying gevent\queue.py -> build\lib.win-amd64-2.7\gevent

copying gevent\resolver_ares.py -> build\lib.win-amd64-2.7\gevent

copying gevent\resolver_thread.py -> build\lib.win-amd64-2.7\gevent

copying gevent\select.py -> build\lib.win-amd64-2.7\gevent

copying gevent\server.py -> build\lib.win-amd64-2.7\gevent

copying gevent\signal.py -> build\lib.win-amd64-2.7\gevent

copying gevent\socket.py -> build\lib.win-amd64-2.7\gevent

copying gevent\ssl.py -> build\lib.win-amd64-2.7\gevent

copying gevent\subprocess.py -> build\lib.win-amd64-2.7\gevent

copying gevent\thread.py -> build\lib.win-amd64-2.7\gevent

copying gevent\threading.py -> build\lib.win-amd64-2.7\gevent

copying gevent\threadpool.py -> build\lib.win-amd64-2.7\gevent

copying gevent\timeout.py -> build\lib.win-amd64-2.7\gevent

copying gevent\util.py -> build\lib.win-amd64-2.7\gevent

copying gevent\win32util.py -> build\lib.win-amd64-2.7\gevent

copying gevent\wsgi.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_corecffi_build.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_fileobjectcommon.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_fileobjectposix.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_semaphore.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_socket2.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_socket3.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_socketcommon.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_ssl2.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_ssl3.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_sslgte279.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_tblib.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_threading.py -> build\lib.win-amd64-2.7\gevent

copying gevent\_util_py2.py -> build\lib.win-amd64-2.7\gevent

copying gevent\__init__.py -> build\lib.win-amd64-2.7\gevent

running build_ext

building 'gevent.corecext' extension

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27

----------------------------------------
Cleaning up...【以下为红色】
Command
C:\Python27\python.exe -c "import setuptools,
tokenize;__file__='c:\\users\\hello\\appdata\\local\\temp\\pip_build_hello\\gevent\\setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record
c:\users\hello\appdata\local\temp\pip-okbpxc-record\install-record.txt
--single-version-externally-managed --compile failed with error code 1
in c:\users\hello\appdata\local\temp\pip_build_hello\gevent
Storing debug log for failure in C:\Users\hello\pip\pip.log

尝试解决方案

到http://aka.ms/vcpython27下载vc4python27 安装后重试

结果:解决了部分问题,然后又提示zlib缺少,可以看pip.log