0

I am trying to install osmnx using the command

python -m pip install osmnx

but it gives the following error:

'Command "python setup.py egg_info" failed with error code 1 in C:\Users\myname\AppData\Local\Temp\pip-install-o3ha6gld\Shapely\'

Amat
  • 181
  • 1
  • 2
  • 6

3 Answers3

1

OSMnx installation instructions are provided in its documentation: https://osmnx.readthedocs.io/en/stable/

conda installation is strongly recommended to avoid issues:

conda config --prepend channels conda-forge
conda create -n ox --strict-channel-priority osmnx
gboeing
  • 3,789
  • 1
  • 9
  • 24
1

For some reason you need to download the wheel for that specific module and install separately:

Install Shapely: OSError: [WinError 126] The specified module could not be found

Then OSMnx will continue to install normally

Alan M.
  • 19
  • 2
0

Installation

You can install OSMnx with conda:

conda config --prepend channels conda-forge
conda create -n ox --strict-channel-priority osmnx

Alternatively, you can run OSMnx + Jupyter directly from the official docker container, or you can install OSMnx via pip if you already have all of its dependencies installed and tested on your system. Note: pip installation is nontrivial. If you don’t know exactly what you’re doing, just use conda as described above.

To upgrade OSMnx to a newer release, just remove the conda environment you created and then create a new one again following the steps above. Don’t just run conda update or you could get package conflicts.

Arnab Das
  • 49
  • 1
  • 3