colesbury / nogil

Multithreaded Python without the GIL
Other
2.91k stars 107 forks source link

Failed building wheel for pygeos #96

Closed dmitrii-erkin closed 1 year ago

dmitrii-erkin commented 1 year ago

Hello, Thank you very much for your effort building this amazing feature. Unfortunately, it fails to install pygeos (please, see the logs below). Maybe this failure has something to do with a Linux version used for nogil/python, because this installation works fine with python:3.9-slim.

#0 447.8 Building wheels for collected packages: shapely, pygeos
#0 447.8   Building wheel for shapely (pyproject.toml): started
#0 449.0   Building wheel for shapely (pyproject.toml): finished with status 'error'
#0 449.0   ERROR: Command errored out with exit status 1:
#0 449.0    command: /usr/local/bin/python3.9 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp5q97f4bq
#0 449.0        cwd: /tmp/pip-install-3ojbbl16/shapely_10f3eb52c76f4e65816f9aba162754c5
#0 449.0   Complete output (103 lines):
#0 449.0   Could not find geos-config executable. Either append the path to geos-config to PATH or manually provide the include_dirs, library_dirs, libraries and other link args for compiling against a GEOS version >=3.5.
#0 449.0   /tmp/pip-build-env-z2q4vuz9/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py:108: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
#0 449.0     warnings.warn(msg, _BetaConfiguration)
#0 449.0   running bdist_wheel
#0 449.0   running build
#0 449.0   running build_py
#0 449.0   creating build
#0 449.0   creating build/lib.linux-x86_64-nogil-39
#0 449.0   creating build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/set_operations.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/_version.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/prepared.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/enum.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/coordinates.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/linear.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/creation.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/validation.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/strtree.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/ops.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/__init__.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/wkt.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/wkb.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/_ragged_array.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/geos.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/speedups.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/coords.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/testing.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/io.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/measurement.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/errors.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/predicates.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/_geometry.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/decorators.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/affinity.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/constructive.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/plotting.py -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   creating build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/polygon.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/point.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/base.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/multilinestring.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/multipoint.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/geo.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/multipolygon.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/__init__.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/conftest.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/collection.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   copying shapely/geometry/linestring.py -> build/lib.linux-x86_64-nogil-39/shapely/geometry
#0 449.0   creating build/lib.linux-x86_64-nogil-39/shapely/vectorized
#0 449.0   copying shapely/vectorized/__init__.py -> build/lib.linux-x86_64-nogil-39/shapely/vectorized
#0 449.0   creating build/lib.linux-x86_64-nogil-39/shapely/algorithms
#0 449.0   copying shapely/algorithms/polylabel.py -> build/lib.linux-x86_64-nogil-39/shapely/algorithms
#0 449.0   copying shapely/algorithms/cga.py -> build/lib.linux-x86_64-nogil-39/shapely/algorithms
#0 449.0   copying shapely/algorithms/__init__.py -> build/lib.linux-x86_64-nogil-39/shapely/algorithms
#0 449.0   creating build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_creation.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_ragged_array.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_measurement.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_constructive.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_set_operations.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_testing.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/common.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_predicates.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_strtree.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_creation_indices.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_coordinates.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_geometry.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/__init__.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_plotting.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_linear.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_misc.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   copying shapely/tests/test_io.py -> build/lib.linux-x86_64-nogil-39/shapely/tests
#0 449.0   creating build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_multipolygon.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_hash.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_coords.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_multilinestring.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_geometry_base.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_polygon.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_emptiness.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_multipoint.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_collection.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/__init__.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_linestring.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_format.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_multi.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/tests/geometry/test_point.py -> build/lib.linux-x86_64-nogil-39/shapely/tests/geometry
#0 449.0   copying shapely/_pygeos_api.pxd -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   copying shapely/_geos.pxd -> build/lib.linux-x86_64-nogil-39/shapely
#0 449.0   UPDATING build/lib.linux-x86_64-nogil-39/shapely/_version.py
#0 449.0   set build/lib.linux-x86_64-nogil-39/shapely/_version.py to '2.0.0'
#0 449.0   running build_ext
#0 449.0   building 'shapely.lib' extension
#0 449.0   creating build/temp.linux-x86_64-nogil-39
#0 449.0   creating build/temp.linux-x86_64-nogil-39/src
#0 449.0   gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.9 -I/tmp/pip-build-env-z2q4vuz9/overlay/lib/python3.9/site-packages/numpy/core/include -c src/c_api.c -o build/temp.linux-x86_64-nogil-39/src/c_api.o
#0 449.0   In file included from src/c_api.h:22,
#0 449.0                    from src/c_api.c:15:
#0 449.0   src/geos.h:15:10: fatal error: geos_c.h: No such file or directory
#0 449.0      15 | #include <geos_c.h>
#0 449.0         |          ^~~~~~~~~~
#0 449.0   compilation terminated.
#0 449.0   error: command '/usr/bin/gcc' failed with exit code 1
#0 449.0   ----------------------------------------
#0 449.0   ERROR: Failed building wheel for shapely
#0 449.0   Building wheel for pygeos (pyproject.toml): started
#0 450.0   Building wheel for pygeos (pyproject.toml): finished with status 'error'
#0 450.1   ERROR: Command errored out with exit status 1:
#0 450.1    command: /usr/local/bin/python3.9 /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmptpi9l3ix
#0 450.1        cwd: /tmp/pip-install-3ojbbl16/pygeos_c734a3209c1d4a648b2e916010d7c47e
#0 450.1   Complete output (66 lines):
#0 450.1   Could not find geos-config executable. Either append the path to geos-config to PATH or manually provide the include_dirs, library_dirs, libraries and other link args for compiling against a GEOS version >=3.5.
#0 450.1   running bdist_wheel
#0 450.1   running build
#0 450.1   running build_py
#0 450.1   creating build
#0 450.1   creating build/lib.linux-x86_64-nogil-39
#0 450.1   creating build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/testing.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/io.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/linear.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/geometry.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/coordinates.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/__init__.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/enum.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/decorators.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/measurement.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/_version.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/constructive.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/strtree.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/creation.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/set_operations.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/predicates.py -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   creating build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/__init__.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_constructive.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_linear.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_geometry.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_misc.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_testing.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_coordinates.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_predicates.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/common.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_creation_indices.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_creation.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_set_operations.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_strtree.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_io.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   copying pygeos/tests/test_measurement.py -> build/lib.linux-x86_64-nogil-39/pygeos/tests
#0 450.1   running egg_info
#0 450.1   writing pygeos.egg-info/PKG-INFO
#0 450.1   writing dependency_links to pygeos.egg-info/dependency_links.txt
#0 450.1   writing requirements to pygeos.egg-info/requires.txt
#0 450.1   writing top-level names to pygeos.egg-info/top_level.txt
#0 450.1   reading manifest file 'pygeos.egg-info/SOURCES.txt'
#0 450.1   adding license file 'LICENSE'
#0 450.1   writing manifest file 'pygeos.egg-info/SOURCES.txt'
#0 450.1   copying pygeos/_geometry.c -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/_geometry.pyx -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/_geos.c -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/_geos.pxd -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/_geos.pyx -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   copying pygeos/_pygeos_api.pxd -> build/lib.linux-x86_64-nogil-39/pygeos
#0 450.1   UPDATING build/lib.linux-x86_64-nogil-39/pygeos/_version.py
#0 450.1   set build/lib.linux-x86_64-nogil-39/pygeos/_version.py to '0.14'
#0 450.1   running build_ext
#0 450.1   building 'pygeos.lib' extension
#0 450.1   creating build/temp.linux-x86_64-nogil-39
#0 450.1   creating build/temp.linux-x86_64-nogil-39/src
#0 450.1   gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.9 -I/tmp/pip-build-env-5_l67yae/overlay/lib/python3.9/site-packages/numpy/core/include -c src/c_api.c -o build/temp.linux-x86_64-nogil-39/src/c_api.o
#0 450.1   In file included from src/c_api.h:22,
#0 450.1                    from src/c_api.c:15:
#0 450.1   src/geos.h:15:10: fatal error: geos_c.h: No such file or directory
#0 450.1      15 | #include <geos_c.h>
#0 450.1         |          ^~~~~~~~~~
#0 450.1   compilation terminated.
#0 450.1   error: command '/usr/bin/gcc' failed with exit code 1
#0 450.1   ----------------------------------------
#0 450.1   ERROR: Failed building wheel for pygeos
#0 450.1 Failed to build shapely pygeos
#0 450.1 ERROR: Could not build wheels for shapely, pygeos, which is required to install pyproject.toml-based projects
colesbury commented 1 year ago

I'll look into this.

It looks like you are installing both shapely and pygeos. I am not familiar with either package, but the pygeos description says it was merged with shapely 2.0, which was released a few weeks ago. Do you want both packages?

colesbury commented 1 year ago

I've uploaded wheels for shapely 2.0 and pygeos 0.14. You should be able to install them now with pip install.

Please let me know if it works for you or if you run into any issues.

dmitrii-erkin commented 1 year ago

The issue is fixed, thank you very much.