good afternoon, I've been working with osmnx in Google Colab for a while, and since this morning it doesn't work, when I go to import the library once installed it gives me the following error
here the complete process followed
!apt install gdal-bin python-gdal python3-gdal --quiet
!apt install python3-rtree --quiet
!pip install git+git://github.com/geopandas/geopandas.git --quiet
!pip install descartes --quiet
!pip install pysal --quiet
!pip install splot --quiet
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
import pysal
from pysal.lib import weights
from pysal.explore import esda
from esda.moran import Moran, Moran_Local
import splot
from splot.esda import moran_scatterplot, plot_moran, lisa_cluster
!pip install osmnx
Downloading osmnx-1.2.2-py2.py3-none-any.whl (92 kB) |████████████████████████████████| 92 kB 508 kB/s Collecting pandas>=1.4 Downloading pandas-1.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB) |████████████████████████████████| 12.2 MB 67.6 MB/s Collecting Rtree>=1.0 Downloading Rtree-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB) |████████████████████████████████| 1.0 MB 73.7 MB/s Collecting Shapely<2.0,>=1.8 Downloading Shapely-1.8.5.post1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB) |████████████████████████████████| 2.1 MB 51.2 MB/s Collecting numpy>=1.22 Downloading numpy-1.24.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) |████████████████████████████████| 17.3 MB 76.5 MB/s Requirement already satisfied: pyproj>=3.3 in /usr/local/lib/python3.8/dist-packages (from osmnx) (3.4.1) Requirement already satisfied: geopandas>=0.11 in /usr/local/lib/python3.8/dist-packages (from osmnx) (0.12.2) Collecting requests>=2.28 Downloading requests-2.28.1-py3-none-any.whl (62 kB) |████████████████████████████████| 62 kB 1.4 MB/s Requirement already satisfied: networkx>=2.8 in /usr/local/lib/python3.8/dist-packages (from osmnx) (2.8.8) Collecting matplotlib>=3.5 Downloading matplotlib-3.6.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.4 MB) |████████████████████████████████| 9.4 MB 65.5 MB/s Requirement already satisfied: fiona>=1.8 in /usr/local/lib/python3.8/dist-packages (from geopandas>=0.11->osmnx) (1.8.22) Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from geopandas>=0.11->osmnx) (21.3) Requirement already satisfied: six>=1.7 in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (1.15.0) Requirement already satisfied: certifi in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (2022.12.7) Requirement already satisfied: cligj>=0.5 in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (0.7.2) Requirement already satisfied: click-plugins>=1.0 in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (1.1.1) Requirement already satisfied: click>=4.0 in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (7.1.2) Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (57.4.0) Requirement already satisfied: attrs>=17 in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (22.1.0) Requirement already satisfied: munch in /usr/local/lib/python3.8/dist-packages (from fiona>=1.8->geopandas>=0.11->osmnx) (2.5.0) Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.5->osmnx) (3.0.9) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.5->osmnx) (1.4.4) Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.5->osmnx) (7.1.2) Collecting fonttools>=4.22.0 Downloading fonttools-4.38.0-py3-none-any.whl (965 kB) |████████████████████████████████| 965 kB 65.6 MB/s Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.5->osmnx) (2.8.2) Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.5->osmnx) (0.11.0) Collecting contourpy>=1.0.1 Downloading contourpy-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (295 kB) |████████████████████████████████| 295 kB 88.3 MB/s Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.8/dist-packages (from pandas>=1.4->osmnx) (2022.6) Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.8/dist-packages (from requests>=2.28->osmnx) (2.1.1) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests>=2.28->osmnx) (2.10) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=2.28->osmnx) (1.25.11) Installing collected packages: numpy, Shapely, pandas, fonttools, contourpy, Rtree, requests, matplotlib, osmnx Attempting uninstall: numpy Found existing installation: numpy 1.21.6 Uninstalling numpy-1.21.6: Successfully uninstalled numpy-1.21.6 Attempting uninstall: Shapely Found existing installation: shapely 2.0.0 Uninstalling shapely-2.0.0: Successfully uninstalled shapely-2.0.0 Attempting uninstall: pandas Found existing installation: pandas 1.3.5 Uninstalling pandas-1.3.5: Successfully uninstalled pandas-1.3.5 Attempting uninstall: Rtree Found existing installation: Rtree 0.8.3 Uninstalling Rtree-0.8.3: Successfully uninstalled Rtree-0.8.3 Attempting uninstall: requests Found existing installation: requests 2.23.0 Uninstalling requests-2.23.0: Successfully uninstalled requests-2.23.0 Attempting uninstall: matplotlib Found existing installation: matplotlib 3.2.2 Uninstalling matplotlib-3.2.2: Successfully uninstalled matplotlib-3.2.2
import osmnx
and that's when it gives me the following error:
ImportError: cannot import name 'TopologicalError' from 'shapely.geos' (/usr/local/lib/python3.8/dist-packages/shapely/geos.py)
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the "Open Examples" button below.
Anyone knows how can I Solve it,
Thanks a lot.