我一直使用pip install geopandas
在Mac上安装该库(操作系统:Mojave v10.14)。但是,到目前为止,我安装失败。
这是我得到的错误:
Collecting pyproj (from geopandas)
Downloading https://files.pythonhosted.org/packages/26/8c/1da0580f334718e04f8bbf74f0515a7fb8185ff96b2560ce080c11aa145b/pyproj-1.9.6.tar.gz (2.8MB)
100% |████████████████████████████████| 2.8MB 9.0MB/s
Complete output from command python setup.py egg_info:
using bundled proj4..
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-C35peF/pyproj/setup.py", line 86, in <module>
objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/unixccompiler.py", line 125, in _compile
raise CompileError, msg
distutils.errors.CompileError: command 'cc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-C35peF/pyproj/
任何想法为什么会发生这种情况以及如何解决?
答案 0 :(得分:0)
Pyproj PyPI已过时。您既可以通过Conda安装GeoPandas,也可以按照GH问题https://github.com/geopandas/geopandas/issues/793中介绍的步骤操作,并通过
从Github预先安装pyproj。pip install git+https://github.com/jswhit/pyproj.git#egg=pyproj
,然后选择pip install geopandas
。