安装底图模块 - 命令'' python setup.py egg_info''失败,错误代码为1

时间:2017-03-16 04:47:29

标签: python windows python-3.x pip matplotlib-basemap

我遇到了困扰我好几个小时的问题。我在这个网站上发现了多次出现这个问题(有些人有点老了),但其他人却没有解决方案,所以我决定尝试寻求个人问题的帮助..

我使用的是Windows 10和Python 35-32,32位。我从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载了basemap-1.1.0-cp35-cp35m-win32.whl,并尝试在管理员命令提示符下使用pip install [FULL PATH]进行安装。我已经通过这种方式从同一站点成功安装了一些软件包,但是这个软件包出现了这个错误:

> C:\Users\Chris>pip install
> C:\Users\Chris\Downloads\PythonWindowsModules\basemap-1.1.0-cp35-cp35m-win32.whl
> Processing
> c:\users\chris\downloads\pythonwindowsmodules\basemap-1.1.0-cp35-cp35m-win32.whl
> Collecting pyproj>=1.9.3 (from basemap==1.1.0)   Using cached
> pyproj-1.9.5.1.tar.gz
>     Complete output from command python setup.py egg_info:
>     using bundled proj4..
>     Traceback (most recent call last):
>       File "c:\users\chris\appdata\local\programs\python\python35-32\lib\site-packages\setuptools\msvc.py",
> line 477, in __init__
>         self.vc_ver = self.find_available_vc_vers()[-1]
>     IndexError: list index out of range
> 
>     During handling of the above exception, another exception occurred:
> 
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "C:\Users\Chris\AppData\Local\Temp\pip-build-prn63hc6\pyproj\setup.py",
> line 72, in <module>
>         objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
>       File "c:\users\chris\appdata\local\programs\python\python35-32\lib\distutils\_msvccompiler.py",
> line 317, in compile
>         self.initialize()
>       File "c:\users\chris\appdata\local\programs\python\python35-32\lib\distutils\_msvccompiler.py",
> line 210, in initialize
>         vc_env = _get_vc_env(plat_spec)
>       File "c:\users\chris\appdata\local\programs\python\python35-32\lib\site-packages\setuptools\msvc.py",
> line 172, in msvc14_get_vc_env
>         return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
>       File "c:\users\chris\appdata\local\programs\python\python35-32\lib\site-packages\setuptools\msvc.py",
> line 771, in __init__
>         self.si = SystemInfo(self.ri, vc_ver)
>       File "c:\users\chris\appdata\local\programs\python\python35-32\lib\site-packages\setuptools\msvc.py",
> line 480, in __init__
>         raise distutils.errors.DistutilsPlatformError(err)
>     distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
> http://landinghub.visualstudio.com/visual-cpp-build-tools
> 
>     ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in
> C:\Users\Chris\AppData\Local\Temp\pip-build-prn63hc6\pyproj\

我尝试了pip install --upgrade setuptoolseasy_install -U setuptoolspip install --upgrade pippip install ez_setup。所有更新/要求都显示为最新/已满足。

我确实有matplotlib和numpy,他们工作正常。根据{{​​1}},我有一个9.0.1的点子版本(Python 3.5)。是否有任何建议或有人知道发生了什么?如果需要,我可以提供更多信息/测试。提前谢谢。

0 个答案:

没有答案