简体   繁体   中英

Install geopandas in Pycharm

Sorry if this is a repeat question, But I am new to Python and trying to install Geopandas in Pycharm. My python version is 3.7.2.

  1. I have tried the conventional way of installing library in pycharm through project interpretor.
  2. I have also tried pip install geopandas

Both show same error.

A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

Please provide steps to follow wrt Pycharm if possible.

According to Geopandas's own install instructions , the recommended way is to install via conda package manager, which you can obtain by using the Anaconda or miniconda Python distributions:

conda install geopandas

If, however, you have a Very Good Reason you can't use conda , and absolutely need to use pip , you should try installing GDAL first ( pip install GDAL ), and then checking if the gdal-config command is in your path (ie that you can access it via the terminal). Then you can try installing again from either PyCharm directly or via the command line.

If you can't get it installed from PyCharm and need to specify GDAL_VERSION (which you can get with gdal-config --version ), you'll probably need to install from the command line, where you can set this variable either with an export or directly in the same invocation:

GDAL_VERSION=2.4.2 pip install geopandas

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