I'm very new to using packages in python. I'm on Windows 7 64 bit. I've installed OSGEO4w, and I've checked numpy and scipy are installed. I assume GDAL is installed when I installed OSGEO4W, and I put the bin directory where I see most gdal items (C:\OSGEO4W_2.14\bin) into my windows environment path.

I'm trying to install this much needed centerline package: github.com/fitodic/centerline I installed pip at the OSGEO4W shell using:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

And then:

python get-pip.py

This installs pip, setuptools and wheel. I then try to install the package using:

pip install centerline

and it starts installing, but errors out with:

Collecting Fiona (from centerline) Using cached Fiona-1.7.0.post2.tar.gz . Complete output from command python setup.py egg_info: Traceback (most recent call last): File "(string), line 1, in (module) File "c:\users...appdata\local\temp\pip-build-oakjl0\Fiona\setup.py", line 193, in (module) if gdalversion.startswith("1"): NameError name 'gdalversion' is not defined. Command "python setup.py egg_info" failed with error code 1 in "c:\users...appdata\local\temp\pip_build-oakj10\Fiona\

It appears the setup.py script can't find the gdal version. I see there are some issues in the Fiona package, but I'm not sure what to do with those comments. How do I resolve this error so that the centerline package will install?

1 Answer 1


You need to create the following environment variables GDAL_PATH and GDAL_CONFIG with their corresponding paths. Before Fiona install gdal for python using pip install gdal and then check if it's running properly.

  • Running "pip install gdal" results in it saying gdal is installed already. I got the impression gdal-config only exists in Linux, not windows. I'm not sure how to get around this on windows.
    – Jan
    Sep 14, 2016 at 22:22
  • This could be a problem with the Fiona package then. Try installing it independently by using whl files from lfd.uci.edu/~gohlke/pythonlibs
    – Raj Bhagat
    Sep 14, 2016 at 22:34
  • Fiona installed using the whl, but when I then tried to install the "pip install centerline" I get about three times as many errors as before, some related to lapack and blas missing when it tries to use scipy. Some research shows this is getting very complicated to get these libraries included on Windows as they are not readily available to be included in whl packages - at least from my limited understanding.
    – Jan
    Sep 15, 2016 at 4:08
  • Since you're having difficulties in installing different packages and building from source files , it's better you use some ide like anaconda or enthought canopy. Anaconda is free and you can avoid all these troubles with scipy etc.
    – Raj Bhagat
    Sep 15, 2016 at 4:13

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.