首页 > 解决方案 > 安装“geopandas”时,命令“python setup.py egg_info”在 /tmp/pip-install-dxjZrU/pyproj/ 中失败,错误代码为 1

问题描述

进入正题之前,我的电脑信息:

操作系统:Debian jessie,Python 版本:2.7

我需要为我正在进行的项目安装模块“geopandas”。问题是当我尝试时,我收到以下错误:

root@debian:~# pip install geopandas
Collecting geopandas
  Using cached https://files.pythonhosted.org/packages/0a/0e/8ae74743ed7915ddb7d70cc8dfa8fc0b9b9cc81205c6e288a01915a46192/geopandas-0.3.0-py2.py3-none-any.whl
Collecting pyproj (from geopandas)
  Using cached https://files.pythonhosted.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz
    Complete output from command python setup.py egg_info:
    unable to execute 'i586-linux-gnu-gcc': No such file or directory
    using bundled proj4..
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-dxjZrU/pyproj/setup.py", line 72, in <module>
        objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
      File "/usr/lib/python2.7/distutils/ccompiler.py", line 574, in compile
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "/usr/lib/python2.7/distutils/unixccompiler.py", line 122, in _compile
        raise CompileError, msg
    distutils.errors.CompileError: command 'i586-linux-gnu-gcc' failed with exit status 1
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-dxjZrU/pyproj/

我还在这个网站上查看了关于类似问题的其他问题,大多数人建议更新 setuptools,我已经这样做了,但仍然无法正常工作,这里证明:

root@debian:~# pip install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages (39.2.0)

如果有人可以帮助我,我会很高兴

谢谢

标签: python-2.7installationgeopandas

解决方案


Debian 8 杰西,32 位

'i586-linux-gnu-gcc':没有这样的文件或目录

# apt install g++ gfortran python-all-dev python-numpy libgdal-dev libgeos-dev python-matplotlib


# pip install geopandas
.
.
  Running setup.py install for munch

Successfully installed geopandas shapely pandas fiona descartes pyproj python-dateutil numpy cligj click-plugins munch enum34 click
Cleaning up...

推荐阅读