Amat
Amat

Reputation: 401

pip install osmnx giving error code 1

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\'

Upvotes: 1

Views: 4789

Answers (3)

gboeing
gboeing

Reputation: 6442

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

Upvotes: 1

Arnab Das
Arnab Das

Reputation: 157

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.

Upvotes: 0

Alan M.
Alan M.

Reputation: 19

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

Upvotes: 1

Related Questions