-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The current pip installation of the package has a dependency pygeos
, which tries to call on versioneer.py
during installation and uses outdated configparser formats, resulting in an error similar to this during installation:
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
<string>:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
/tmp/pip-install-g4hol7c2/pygeos_77124a82c63a4559a3f5460b0c825a97/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
LONG_VERSION_PY['git'] = '''
Compiling pygeos/_geometry.pyx because it changed.
Compiling pygeos/_geos.pyx because it changed.
[1/2] Cythonizing pygeos/_geometry.pyx
[2/2] Cythonizing pygeos/_geos.pyx
Traceback (most recent call last):
File "/home/mdshadman_amin/miniforge3/envs/et_sense/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
~~~~^^
File "/home/mdshadman_amin/miniforge3/envs/et_sense/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mdshadman_amin/miniforge3/envs/et_sense/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-1ntx7q7p/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-1ntx7q7p/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-1ntx7q7p/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 214, in <module>
File "/tmp/pip-install-g4hol7c2/pygeos_77124a82c63a4559a3f5460b0c825a97/versioneer.py", line 1480, in get_version
return get_versions()["version"]
~~~~~~~~~~~~^^
File "/tmp/pip-install-g4hol7c2/pygeos_77124a82c63a4559a3f5460b0c825a97/versioneer.py", line 1412, in get_versions
cfg = get_config_from_root(root)
File "/tmp/pip-install-g4hol7c2/pygeos_77124a82c63a4559a3f5460b0c825a97/versioneer.py", line 342, in get_config_from_root
parser = configparser.SafeConfigParser()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
The solution, as pointed out here , suggests
Pygeos installation still fails, and I try to find the reason in GitHub:
The requirement pygeos fails to install with python 3.12 with the error described here: pygeos/pygeos#463
The maintainer explains that pygeos is no longer maintained and has been merged into the shapley 2.0 dependency of geopandas. Since version 0.14, geopandas uses shapley instead of pygeos: https://geopandas.org/en/stable/docs/user_guide/pygeos_to_shapely.html
Therefore, the PR drops the unmaintained pygeos and requires geopandas >= 0.14 to ensure the default shapley version is used instead.