安装错误:Pyproj

时间:2017-11-30 21:06:01

标签: python installation pyproj

我尝试从cmd安装pyprog但是我发现了以下错误。谁能解释我解决它?!

收集pyproj(来自LatLon)   使用缓存的pyproj-1.9.5.1.tar.gz     从命令python setup.py egg_info完成输出:     使用捆绑的proj4 ..     Traceback(最近一次调用最后一次):       文件" C:\ Users \ Andrea \ AppData \ Local \ Programs \ Python \ Python36 \ lib \ site-packages \ setuptools \ msvc.py",第490行,在_find_latest_available_vc_ver         return self.find_available_vc_vers()[ - 1]     IndexError:列表索引超出范围

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Andrea\AppData\Local\Temp\pycharm-packaging\pyproj\setup.py", line 72, in <module>
    objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
  File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\distutils\_msvccompiler.py", line 345, in compile
    self.initialize()
  File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\distutils\_msvccompiler.py", line 238, in initialize
    vc_env = _get_vc_env(plat_spec)
  File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
    return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
  File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 844, in __init__
    self.si = SystemInfo(self.ri, vc_ver)
  File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 486, in __init__
    self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
  File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 493, in _find_latest_available_vc_ver
    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

命令&#34; python setup.py egg_info&#34; C:\ Users \ Andrea \ AppData \ Local \ Temp \ pycharm-packaging \ pyproj \

中的错误代码1失败

3 个答案:

答案 0 :(得分:2)

对于在Mac上找不到有用答案的用户:请尝试

    pip install git+https://github.com/jswhit/pyproj.git

这可能会要求您安装cython,所以只需这样做

    pip install cython

当其他方法都无效时,这对我有用。感谢github上的@micahcochran。

答案 1 :(得分:1)

您可以从here下载pyproj二进制文件并通过以下方式安装:pip install <filename>.whl

答案 2 :(得分:0)

解决方案写在最后一行:

Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

您是否尝试过下载并安装它?