Beatriz Santos
Beatriz Santos

Reputation: 175

Import osmnx to python

I'm trying to use the osmnx package in Python. I followed the steps given in https://osmnx.readthedocs.io/en/stable/ and I now have an enviorment in anconda with the given package.

But, when I try to import this package to python with:

import osmnx

I get an error saying:

No module named 'osmnx'

Could anyone help me with this? Thank you!

Upvotes: 0

Views: 476

Answers (1)

Guy Nachshon
Guy Nachshon

Reputation: 2655

edit - another solution:

try conda install osmnx and then conda install gdal=2.4.4


try creating a new full env for OSMnx:

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

then activate that environment using:

(base) C:\Users\User>conda activate ox

to test for successful installation run

(ox) C:\Users\User>python
>>> import osmnx as ox

Upvotes: 0

Related Questions