6

Can someone help me with this error concerning installation of geopandas even after installing 'shapely'?

Error: cwd: C:\Users\JASHVA~1\AppData\Local\Temp\pip-install-ccci6ax2\fiona\ Complete output (1 lines): 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 th e logs for full command output.

2
  • 1
    Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Please check out our short tour to learn about our focussed Q&A format. What were the detailed steps that you performed to try and install GeoPandas?
    – PolyGeo
    Commented Aug 2, 2019 at 6:56
  • In general, I would also recommend to use conda instead of pip to install GeoPandas, see geopandas.readthedocs.io/en/latest/…
    – joris
    Commented Aug 2, 2019 at 8:17

4 Answers 4

13

The problem is with fiona not with shapely, try to install it separately not as a dependence of geopandas

Download the right version for your Python version (the "cpXY" part of the filenames) from https://www.lfd.uci.edu/~gohlke/pythonlibs:

Then install it using pip install path/to/gdal.whl and pip install path/to/fiona.whl

And finally you can install geopandas using pip install geopandas

2
0

Use conda install -c conda-forge geopandas.

1
  • This command also gives errors.. conda verification error: The package for libwebp located at C:\xxx\xxx\Anaconda3\pkgs\libwebp-1.2.0-h2bbff1b_0 appears to be corrupted. The path 'Library/bin/cwebp.exe' specified in the package manifest cannot be found and multiple such errors for other packages.
    – rao
    Commented Dec 8, 2021 at 14:25
0

I have Windows 10 and I have same problem.

When I try first time install fiona with top-answer in topic (via .whl) I got error, but second time was successful (mb cython was need, I don't know). So my tries to install first time fiona below.

I wanted to install geopandas, but before it I had to install Fiona. And this was my solution:

  1. Download binary gdal from here. I choosed this: release-1911-x64-gdal-2-4-4-mapserver-7-4-3.

    1.1. You need to download 1 zip-file: release-1911-x64-gdal-2-4-4-mapserver-7-4-3-libs.zip

    1.2. Extract this to local path, e.g. "C:\\Users\\Jack\\Gdal"

  2. Download Fiona from master. You can download zip now

  3. Unpacking Fiona-master.zip, e.g. "C:\\Users\\Jack\\Fiona-master"

  4. Open CMD, open dir "Fiona-master": chdir "C:\\Users\\Jack\\Fiona-master" and run this (with your paths):

    python setup.py build_ext -I"<PATH_TO_GDAL_INCLUDE_DIR>" -lgdal_i -L"<PATH_TO_GDAL_LIB_DIR>" install --gdalversion 2.1

    In my case:

    python setup.py build_ext -I"C:\\Users\\Jack\\Gdal\\include" -lgdal_i -L"C:\\Users\\Vasilev_EN\\Downloads\\Gdal\\lib" install --gdalversion 2.1

  5. I didn't have cython and got error, so: pip install cython

  6. Again try run long string from (4)

  7. After success: pip install geopandas worked fine

4
  • 1
    That is very complicated and an old GDAL version. Didn't the top answer work for you? Commented Aug 3, 2021 at 15:58
  • top answer not working. I found link to solution here github.com/Toblerity/Fiona/issues/449. solution shortly: github.com/Toblerity/Fiona#windows
    – Jackssn
    Commented Aug 3, 2021 at 16:15
  • 1
    It should work fine if you grab both Fiona and GDAL wheels from the site, that is super confusing though... You need to pick the right Python version ("cpXY"). Commented Aug 3, 2021 at 16:36
  • 1
    in answers I didn't see requirement to install gdal via pip, so may be it was source of troubles
    – Jackssn
    Commented Aug 3, 2021 at 16:38
0

I was running into the same issue but have been able to get it properly installed using a combination of conda and pip installs.

  1. Instal fiona using conda (conda install fiona)
  2. Install geopandas using pip (pip install geopandas)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.