Implementation in jupyter
import osmnx asox
G=ox.graph_from_place('Manhattan Island, New York City, New York, USA', network_type='drive')
ox.plot_graph(ox.project_graph(G))
Error Contents
------------------------------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-18-22e533a47a02>in<module>
---->1 import osmnx asox
2G=ox.graph_from_place('Manhattan Island, New York City, New York, USA', network_type='drive')
3ox.plot_graph(ox.project_graph(G))
~/anaconda3/lib/python 3.8/site-packages/osmnx/_init__.pyin<module>
US>"OSMnx init."
2
---->3 from._api import*
4 from._version import__version__
~/anaconda3/lib/python 3.8/site-packages/osmnx/_api.py in<module>
2
3 from.bearing import add_edge_bears
---->4 from.distance import get_nearest_edge
5 from.distance import get_nearest_edges
6 from.distance import get_nearest_node
~/anaconda3/lib/python 3.8/site-packages/osmnx/distance.py in<module>
9
10 from.import utils
--- >11 from.import utils_geo
12 from.import utils_graph
13
~/anaconda3/lib/python 3.8/site-packages/osmnx/utils_geo.py in<module>
12 from shapely.ops import split
13
--- >14 from.import projection
15 from.import settings
16 from.import utils
~/anaconda3/lib/python 3.8/site-packages/osmnx/projection.py in<module>
3 import path
4
---->5 import geopandas as gpd
6 from pyprojimport CRS
7
~/anaconda3/lib/python3.8/site-packages/geopandas/_init__.pyin<module>
---->1 from geopandas._config import options#noqa
2
3 from geopandas.geoseries import GeoSeries #noqa
4 from geopandas.geodataframe import GeoDataFrame #noqa
5 from geopandas.array import points_from_xy#noqa
~/anaconda3/lib/python 3.8/site-packages/geopandas/_config.py in<module>
124 use_pygeos=Option(
125 key = "use_pygeos",
-->126 default_value=_default_use_pygeos(),
127 doc = (
128 "Whither to use PyGEOS to speed up special operations. The default is True"
~/anaconda3/lib/python3.8/site-packages/geopandas/_config.py in_default_use_pygeos()
112 import geopandas._compat as compat
113
-->114 return compat.USE_PYGEOS
115
116
AttributeError: module 'geopandas._compat' has no attribute 'USE_PYGEOS'
Please let me know if there is any other missing information.
python anaconda
As of August 8, 2021, osmnx was available from ANACONDA as follows:
conda install-conda-forge osmnx
https://anaconda.org/conda-forge/osmnx
© 2024 OneMinuteCode. All rights reserved.