Is this a general bug of osmnx's installation? cannot import "shapely.geos import TopologicalError"

Question:

When I want to import osmnx, this error comes up. I created a new environment before and followed the standard installation process via conda.

enter image description here

Asked By: SYC

||

Answers:

You’re using a years-old version of OSMnx and a brand new version of Shapely. They are incompatible.

  • OSMnx >= 1.3 works with Shapely >= 2.0, see here.
  • OSMnx < 1.3 works with Shapely < 2.0, see here.

Recreate your environment (and optionally explicitly specify osmnx=1.3.*) and it’ll work. Make sure you follow the documented installation instructions and honor the dependency versions specified in OSMnx’s requirements.txt file.

Answered By: gboeing
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.