gboeing / osmnx

OSMnx is a Python package to easily download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap.
https://osmnx.readthedocs.io
MIT License
4.89k stars 827 forks source link

No Modules 1.9.3 #1197

Closed changxu001 closed 3 months ago

changxu001 commented 3 months ago

Contributing guidelines

Documentation

Existing issues

What operating system and Python version are you using?

Mac/3.12

What OSMnx version are you using?

3.9.2

Environment packages and versions

# Name                    Version                   Build  Channel
affine                    2.4.0              pyhd8ed1ab_0    conda-forge
appnope                   0.1.4              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
aws-c-auth                0.7.22              hb04b931_10    conda-forge
aws-c-cal                 0.7.1                hd73d8db_1    conda-forge
aws-c-common              0.9.23               hfdf4475_0    conda-forge
aws-c-compression         0.2.18               hd73d8db_7    conda-forge
aws-c-event-stream        0.4.2               h2713d70_15    conda-forge
aws-c-http                0.8.2                he29c2fd_6    conda-forge
aws-c-io                  0.14.10              h4406d91_1    conda-forge
aws-c-mqtt                0.10.4               hf6997d9_8    conda-forge
aws-c-s3                  0.6.0                h13137a3_2    conda-forge
aws-c-sdkutils            0.1.16               hd73d8db_3    conda-forge
aws-checksums             0.1.18               hd73d8db_7    conda-forge
aws-crt-cpp               0.27.3               h0a15bd7_2    conda-forge
aws-sdk-cpp               1.11.329             h554caeb_9    conda-forge
azure-core-cpp            1.12.0               hf8dbe3c_0    conda-forge
azure-identity-cpp        1.8.0                h906f3f0_1    conda-forge
azure-storage-blobs-cpp   12.11.0              h5f32033_1    conda-forge
azure-storage-common-cpp  12.6.0               h0dc8e96_1    conda-forge
blosc                     1.21.6               h7d75f6d_0    conda-forge
branca                    0.7.2              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                h0dc2134_1    conda-forge
brotli-bin                1.1.0                h0dc2134_1    conda-forge
brotli-python             1.1.0           py312heafc425_1    conda-forge
bzip2                     1.0.8                hfdf4475_7    conda-forge
c-ares                    1.32.2               h51dda26_0    conda-forge
ca-certificates           2024.7.4             h8857fd0_0    conda-forge
cairo                     1.18.0               h37bd5c4_3    conda-forge
certifi                   2024.7.4           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py312h38bf5a0_0    conda-forge
cfitsio                   4.4.1                ha105788_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_1    conda-forge
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1           py312h9230928_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.2           py312h28f332c_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.6.2                h73e2aa4_0    conda-forge
fmt                       10.2.1               h7728843_0    conda-forge
folium                    0.17.0             pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge
fontconfig                2.14.2               h5bb23bf_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.53.1          py312hbd25219_0    conda-forge
freetype                  2.12.1               h60636b9_2    conda-forge
freexl                    2.0.0                h3ec172f_0    conda-forge
gdal                      3.9.1           py312h4908f73_7    conda-forge
geopandas                 1.0.1              pyhd8ed1ab_0    conda-forge
geopandas-base            1.0.1              pyha770c72_0    conda-forge
geos                      3.12.2               hf036a51_0    conda-forge
geotiff                   1.7.3                h4bbec01_1    conda-forge
giflib                    5.2.2                h10d778d_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hdf4                      4.2.15               h8138101_7    conda-forge
hdf5                      1.14.3          nompi_h687a608_105    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       75.1                 h120a0e1_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        8.0.0              pyha770c72_0    conda-forge
importlib_metadata        8.0.0                hd8ed1ab_0    conda-forge
ipykernel                 6.29.5             pyh57ce528_0    conda-forge
ipython                   8.26.0             pyh707e725_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
json-c                    0.17                 h6253ea5_1    conda-forge
jupyter_client            8.6.2              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2           py312hb401068_0    conda-forge
kealib                    1.5.3                hb2b617a_1    conda-forge
kiwisolver                1.4.5           py312h49ebfd2_1    conda-forge
krb5                      1.21.3               h37d8d59_0    conda-forge
lcms2                     2.16                 ha2f27b4_0    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libabseil                 20240116.2      cxx17_hf036a51_1    conda-forge
libaec                    1.1.3                h73e2aa4_0    conda-forge
libarchive                3.7.4                h20e244c_0    conda-forge
libblas                   3.9.0           22_osx64_openblas    conda-forge
libbrotlicommon           1.1.0                h0dc2134_1    conda-forge
libbrotlidec              1.1.0                h0dc2134_1    conda-forge
libbrotlienc              1.1.0                h0dc2134_1    conda-forge
libcblas                  3.9.0           22_osx64_openblas    conda-forge
libcrc32c                 1.1.2                he49afe7_0    conda-forge
libcurl                   8.8.0                hf9fcc65_1    conda-forge
libcxx                    18.1.8               hef8daea_0    conda-forge
libdeflate                1.20                 h49d49c5_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 h10d778d_2    conda-forge
libexpat                  2.6.2                h73e2aa4_0    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgdal                   3.9.1                h694c41f_7    conda-forge
libgdal-core              3.9.1                hb16c948_7    conda-forge
libgdal-fits              3.9.1                h5d197d2_7    conda-forge
libgdal-grib              3.9.1                h385febf_7    conda-forge
libgdal-hdf4              3.9.1                h86719f3_7    conda-forge
libgdal-hdf5              3.9.1                h513f0eb_7    conda-forge
libgdal-jp2openjpeg       3.9.1                hc5f35ca_7    conda-forge
libgdal-kea               3.9.1                h3b8d0bf_7    conda-forge
libgdal-netcdf            3.9.1                h3127c03_7    conda-forge
libgdal-pdf               3.9.1                h0da0525_7    conda-forge
libgdal-pg                3.9.1                h1b48671_7    conda-forge
libgdal-postgisraster     3.9.1                h1b48671_7    conda-forge
libgdal-tiledb            3.9.1                h48f8f31_7    conda-forge
libgdal-xls               3.9.1                h597966e_7    conda-forge
libgfortran               5.0.0           13_2_0_h97931a8_3    conda-forge
libgfortran5              13.2.0               h2873a65_3    conda-forge
libglib                   2.80.3               h736d271_1    conda-forge
libgoogle-cloud           2.26.0               h721cda5_0    conda-forge
libgoogle-cloud-storage   2.26.0               h9e84e37_0    conda-forge
libgrpc                   1.62.2               h384b2fc_0    conda-forge
libiconv                  1.17                 hd75f5a5_2    conda-forge
libintl                   0.22.5               h5ff76d1_2    conda-forge
libjpeg-turbo             3.0.0                h0dc2134_1    conda-forge
libkml                    1.3.0             hfcbc525_1020    conda-forge
liblapack                 3.9.0           22_osx64_openblas    conda-forge
libnetcdf                 4.9.2           nompi_h7334405_114    conda-forge
libnghttp2                1.58.0               h64cf6d3_1    conda-forge
libopenblas               0.3.27          openmp_h8869122_1    conda-forge
libpng                    1.6.43               h92b6c6a_0    conda-forge
libpq                     16.3                 h4501773_0    conda-forge
libprotobuf               4.25.3               h4e4d658_0    conda-forge
libre2-11                 2023.09.01           h81f5012_2    conda-forge
librttopo                 1.1.0               he2ba7a0_16    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libspatialite             5.1.0                hdc25a2c_8    conda-forge
libsqlite                 3.46.0               h1b8f9f3_0    conda-forge
libssh2                   1.11.0               hd019ec5_0    conda-forge
libtiff                   4.6.0                h129831d_3    conda-forge
libwebp-base              1.4.0                h10d778d_0    conda-forge
libxcb                    1.16                 h0dc2134_0    conda-forge
libxml2                   2.12.7               heaf3512_4    conda-forge
libzip                    1.10.1               hc158999_3    conda-forge
libzlib                   1.3.1                h87427d6_1    conda-forge
llvm-openmp               18.1.8               h15ab845_0    conda-forge
lz4-c                     1.9.4                hf0c8a7f_0    conda-forge
lzo                       2.10              h10d778d_1001    conda-forge
mapclassify               2.6.1              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py312h41838bb_0    conda-forge
matplotlib-base           3.9.1           py312h0d5aeb7_0    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
minizip                   4.0.7                h62b0c8d_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.5                  h5846eda_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
networkx                  3.3                pyhd8ed1ab_1    conda-forge
nspr                      4.35                 hea0b92c_0    conda-forge
nss                       3.102                he7eb89d_0    conda-forge
numpy                     2.0.0           py312h8813227_0    conda-forge
openjpeg                  2.5.2                h7310d3a_0    conda-forge
openssl                   3.3.1                h87427d6_2    conda-forge
osmnx                     1.9.3              pyhd8ed1ab_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2           py312h1171441_1    conda-forge
parso                     0.8.4              pyhd8ed1ab_0    conda-forge
pcre2                     10.44                h7634a1b_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.4.0          py312hbd70edc_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.4               h73e2aa4_0    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
poppler                   24.07.0              h744cbf2_0    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
postgresql                16.3                 h1d90168_0    conda-forge
proj                      9.4.1                hf92c781_0    conda-forge
prompt-toolkit            3.0.47             pyha770c72_0    conda-forge
psutil                    6.0.0           py312hbd25219_0    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyogrio                   0.9.0           py312h43b3a95_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pyproj                    3.6.1           py312ha320102_7    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.12.4          h37a9e06_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyzmq                     26.0.3          py312ha04878a_0    conda-forge
qhull                     2020.2               h3c5361c_5    conda-forge
rasterio                  1.3.10          py312h1c98354_4    conda-forge
re2                       2023.09.01           hb168e87_2    conda-forge
readline                  8.2                  h9e318b2_1    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
scikit-learn              1.5.1           py312hc214ba5_0    conda-forge
scipy                     1.14.0          py312hb9702fa_1    conda-forge
setuptools                71.0.4             pyhd8ed1ab_0    conda-forge
shapely                   2.0.5           py312h594820c_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.1                he1e6707_0    conda-forge
snuggs                    1.4.7                      py_0    conda-forge
spdlog                    1.13.0               h1a4aec9_0    conda-forge
sqlite                    3.46.0               h28673e1_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tiledb                    2.24.2               h86b3714_2    conda-forge
tk                        8.6.13               h1abcd95_1    conda-forge
tornado                   6.4.1           py312hbd25219_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
typing_extensions         4.12.2             pyha770c72_0    conda-forge
tzcode                    2024a                h10d778d_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
uriparser                 0.9.8                h6aefe2f_0    conda-forge
urllib3                   2.2.2              pyhd8ed1ab_1    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
xerces-c                  3.2.5                hfb503d4_1    conda-forge
xorg-libxau               1.0.11               h0dc2134_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xyzservices               2024.6.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
zeromq                    4.3.5                hde137ed_4    conda-forge
zipp                      3.19.2             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h87427d6_1    conda-forge
zstandard                 0.23.0          py312h331e495_0    conda-forge
zstd                      1.5.6                h915ae27_0    conda-forge

How did you install OSMnx?

Conda and conda-forge

Problem description

I installed omsnx following the tutorial: conda create -n ox -c conda-forge --strict-channel-priority osmnx Checked the ox version is: '1.9.3' When running features-demo.ipynb, I couldn't load most of the modules like: ox.convert, ox.distance, etc. Instead I found out that I can directly call ox.add_edge_speeds, without ox.distance.edd_edge_speeds.

Screenshot 2024-07-20 at 18 20 59

After checking the ox modules in jupyter here is the result:

Screenshot 2024-07-20 at 18 19 47

Am Reffering to the correct user reference for 1.9.3? There are no specific modules. Are these tutorials actually for 2.0?

Complete minimal reproducible example

import networkx as nx
import osmnx as ox

# how long is our route in meters?
edge_lengths = ox.route_to_gdf(G, route)["length"
round(sum(edge_lengths))
gboeing commented 3 months ago

Thanks for using OSMnx.

Am Reffering to the correct user reference for 1.9.3? There are no specific modules. Are these tutorials actually for 2.0?

From the examples repo readme:

Note that this repo's main branch generally tracks the functionality of the OSMnx repo's main branch. For examples corresponding to previously released versions of OSMnx, use this repo's tags to browse by release.

Beyond that, your code snippet contains typos but they don't appear to be related to your issue. There does not appear to be a bug with OSMnx here. You're experiencing either an installation problem or user error. There aren't enough details provided to be able to guess which (e.g., how did you activate your conda environment? did you install a jupyter kernel into it first? did you confirm the package version programmatically within the notebook?).

Best I can do is point you to this StackOverflow answer. If you have further usage questions, you can ask on StackOverflow.