繁体   English   中英

Geopandas安装错误distutils.errors.CompileError

[英]Geopandas installation error distutils.errors.CompileError

我一直在使用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/

为什么会发生这种情况的任何想法以及如何解决?

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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