Skip to content

Pip install rasterstats error #311

Closed

Description

@nunezm8

Hi, im receiving this error when trying to download the rasterstats package.

(UHI_NJ) C:\Users\ninas>python -m pip install rasterstats
Collecting rasterstats
Using cached rasterstats-0.20.0-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: affine in .\UHI_NJ\Lib\site-packages (from rasterstats) (2.4.0)
Requirement already satisfied: click>7.1 in .\UHI_NJ\Lib\site-packages (from rasterstats) (8.3.1)
Requirement already satisfied: cligj>=0.4 in .\UHI_NJ\Lib\site-packages (from rasterstats) (0.7.2)
Collecting fiona (from rasterstats)
Using cached fiona-1.10.1.tar.gz (444 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
CRITICAL:root: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.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build 'fiona' when getting requirements to build wheel

Activity

  1. mvtm-dn commented on Mar 31, 2026

    @mvtm-dn

    Maybe this will help: #312

  2. veenstrajelmer commented on May 21, 2026

    @veenstrajelmer

    Just like @mvtm-dn, I also expect this error occurs since you are trying to install it in a Python 3.14 environment. Could you confirm this? Fiona is one of the dependencies for rasterstats, but it is not maintained anymore so it does not support Python 3.14.

  3. perrygeo commented on May 23, 2026

    @perrygeo
    Owner

    Should be resolved with version 0.21.0 released today. Switched to a pyogrio backend per @mvtm-dn suggestion and it works great, better wheel availability and better performance. Let me know in a new issue if you experience trouble with the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions