Installation

Conda

The official supported way to install OSMnx is with conda:

conda create -n ox -c conda-forge --strict-channel-priority osmnx

This creates a new conda environment and installs OSMnx into it, via the conda-forge channel. If you want other packages, such as jupyterlab, installed in this environment as well, just add their names after osmnx above.

To upgrade OSMnx to a newer release, remove the conda environment you created and then create a new one again, as above. Don’t just run “conda update” or you could get package conflicts. See the conda and conda-forge documentation for more details.

Docker

You can run OSMnx + JupyterLab directly from the official OSMnx Docker image.

Pip

You may be able to install OSMnx with pip (in a virtual environment) but this is not officially supported. OSMnx is written in pure Python and its installation alone is thus trivially simple if you already have its dependencies installed and tested on your system. OSMnx depends on packages that in turn depend on C/C++ libraries, and installing those dependencies with pip is sometimes challenging depending on your specific system’s configuration. If you’re not sure what you’re doing, just follow the conda instructions above to avoid installation problems.