question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install pyrosm

See original GitHub issue

I’ve been trying to install this pyrosm on Windows10 and Python 3.6 because it looks potentially useful (although inadequately documented… like, which elements are included in the “walking” network?) for isolating parts of OSM data within a polygon before converting the remaining “highways” into a NetworkX graph.

However, I tried to use pip installl pyrosm, but I cannot install the package because I get the infamous “A GDAL API version must be specified” error.

` Collecting fiona Using cached Fiona-1.8.17.tar.gz (1.3 MB) ERROR: Command errored out with exit status 1: command: ‘c:\winpython\python-3.6.5.amd64\python.exe’ -c 'import sys, setuptools, tokenize; sys.argv[0] = … 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 the logs for full command output.`

The thing is, I already have the newest version of GDAL and Fiona 1.8.17 installed, and I already added GDAL to my path variables, and I can already use geopandas, fiona, shapely, rtree, etc. normally.

I couldn’t find a list of requirements and/or dependencies in the documentation aside from Py3.6, so maybe the real problem is something else.

I hope to be able to use this package, and so I appreciate any assistance in properly installing it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bramsoncommented, Nov 4, 2020

@HTenkanen Thank you for incorporating this fix in the next version.

If I could go back, then I’d go the Anaconda route, as I’ve advised new people in the lab to do. But from where I am, it’s probably a few days of package version compatibility frustration just to get back to exactly where I am. Actually, if there is a function in conda to read a requirements file and get all those versions of all those packages, then it may not be so bad. I’ll look into it. But anyway, as you said, being to install via pip in Windows will only strengthen the package and broaden/accelerate its use.

0reactions
HTenkanencommented, Nov 6, 2020

@bramson Excellent, now everything seems to work. 👍 The warning that you get actually comes from geopandas (used under the hood in pyrosm). It is nothing dangerous and you can ignore it. Will add a note about this to the documentation as well.

Technical details but: It just warns that in couple of different libraries that are used under the hood of geopandas are using different version of GEOS library. This is something that will eventually be fixed once Shapely library is updated to version 2.0 (should happen sometime next year hopefully).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation - Pyrosm
The recommended way to install pyrosm is by using conda package manager: $ conda install -c conda-forge pyrosm. Pyrosm is also distributed via...
Read more >
pyrosm - PyPI
The recommended way to install pyrosm is using conda package manager: ... On Linux and Mac installing geopandas with pip should work without...
Read more >
Pyrosm - :: Anaconda.org
A Python tool to parse OSM data from Protobuf format into Geopandas GeoDataFrames. copied from cf-staging / pyrosm · Conda · Files ·...
Read more >
how to successfully install pyproj and geopandas?
To install conda, you can install the Anaconda python distribution or ... Getting to work geopandas is unfortuntaly not easy, the problem is...
Read more >
How to install Python geospatial libraries (Gdal, Fiona ...
Your browser can't play this video. ... We have created a tutorial that shows the installation process of the Python geospatial libraries in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found