-
Notifications
You must be signed in to change notification settings - Fork 40
Carnets w/ geopandas error #362
Copy link
Copy link
Open
Description
When trying to import geopandas into a notebook on iPadOS I received an error message which seems to somehow be related to the pygeos vs. shapely thing.
The error message is:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import geopandas as gpd
File /private/var/containers/Bundle/Application/AF5F8784-733E-44BC-BFE6-563CEA855822/Carnets-sci.app/Library/lib/python3.13/site-packages/geopandas/__init__.py:1
----> 1 from geopandas._config import options
3 from geopandas.geoseries import GeoSeries
4 from geopandas.geodataframe import GeoDataFrame
File /private/var/containers/Bundle/Application/AF5F8784-733E-44BC-BFE6-563CEA855822/Carnets-sci.app/Library/lib/python3.13/site-packages/geopandas/_config.py:109
102 import geopandas._compat as compat
104 compat.set_use_pygeos(value)
107 use_pygeos = Option(
108 key="use_pygeos",
--> 109 default_value=_default_use_pygeos(),
110 doc=(
111 "Whether to use PyGEOS to speed up spatial operations. The default is True "
112 "if PyGEOS is installed, and follows the USE_PYGEOS environment variable "
113 "if set."
114 ),
115 validator=_validate_bool,
116 callback=_callback_use_pygeos,
117 )
120 def _validate_io_engine(value):
121 if value is not None:
File /private/var/containers/Bundle/Application/AF5F8784-733E-44BC-BFE6-563CEA855822/Carnets-sci.app/Library/lib/python3.13/site-packages/geopandas/_config.py:95, in _default_use_pygeos()
94 def _default_use_pygeos():
---> 95 import geopandas._compat as compat
97 return compat.USE_PYGEOS
File /private/var/containers/Bundle/Application/AF5F8784-733E-44BC-BFE6-563CEA855822/Carnets-sci.app/Library/lib/python3.13/site-packages/geopandas/_compat.py:156
144 warnings.warn(
145 "GeoPandas is set to use PyGEOS over Shapely. PyGEOS support is deprecated"
146 "and will be removed in GeoPandas 1.0, released in the Q1 of 2024. "
(...)
150 stacklevel=6,
151 )
153 USE_SHAPELY_20 = (not USE_PYGEOS) and SHAPELY_GE_20
--> 156 set_use_pygeos()
159 # compat related to deprecation warnings introduced in Shapely 1.8
160 # -> creating a numpy array from a list-like of Multi-part geometries,
161 # although doing the correct thing (not expanding in its parts), still raises
162 # the warning about iteration being deprecated
163 # This adds a context manager to explicitly ignore this warning
166 try:
File /private/var/containers/Bundle/Application/AF5F8784-733E-44BC-BFE6-563CEA855822/Carnets-sci.app/Library/lib/python3.13/site-packages/geopandas/_compat.py:143, in set_use_pygeos(val)
139 raise ImportError(INSTALL_PYGEOS_ERROR)
141 if USE_PYGEOS:
142 # iOS addition: remove this warning.
--> 143 if not (sys.platform == "iOS"):
144 warnings.warn(
145 "GeoPandas is set to use PyGEOS over Shapely. PyGEOS support is deprecated"
146 "and will be removed in GeoPandas 1.0, released in the Q1 of 2024. "
(...)
150 stacklevel=6,
151 )
153 USE_SHAPELY_20 = (not USE_PYGEOS) and SHAPELY_GE_20
NameError: name 'sys' is not defined
------------------------------------------------------------------------------------------------------------------
Is there a way to get rid of it? Thank you very much! Detlev
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels