pip install geopandas:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出

pip install geopandas: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

我尝试在 Jupyter notebook 上使用 pip install geopandas 安装 geopandas 包。但是,我收到错误 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
我还使用 pip install gevent --pre 安装了 gevent,我当前的 python 版本是 3.8.5。然而,还没有任何效果。

我在尝试 pip install geopandas 时遇到了同样的问题。一些 post 建议按照精确的顺序安装依赖项,但由于 fiona.

它们都失败了(对我来说)

最终选择安装 anaconda 并通过 conda 创建虚拟环境来安装 geopandas

创建虚拟环境

conda create -n geo_env

然后激活你的环境:

activate geo_env

安装 Geopandas

conda install --channel conda-forge geopandas

此外,请确保 jupyternb_conda_kernels 加上 ipykernel

备选方案 如果你不想安装anaconda,你可以尝试与上述相同的步骤,即

  1. 创建虚拟环境(参见 https://docs.python.org/3/library/venv.html
  2. pip install geopandas