简体   繁体   中英

Installation error:Pyproj

I try to install pyprog from cmd but I've the following error. Who can explain me to fix it?!


Collecting pyproj (from LatLon) 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\\Andrea\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\setuptools\\msvc.py", line 490, in _find_latest_available_vc_ver return 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\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

Command "python setup.py egg_info" failed with error code 1 in C:\\Users\\Andrea\\AppData\\Local\\Temp\\pycharm-packaging\\pyproj\\

For those on Macs that won't find helpful answers: try

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

this will probably ask you to install cython, so do just this

    pip install cython

This worked for me when nothing else worked. Thanks to @micahcochran on github.

您可以从此处下载pyproj二进制文件并通过以下命令pip install <filename>.whlpip install <filename>.whl

The solution is written in the last line:

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

Did you tried download and install it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM