You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shapely mismatchs with system geos library when geos-3.7 #651
I am developing a project which uses both Shapely and libgeos, I create shapes with 'shapely', pass with Cython to C++ library and process them with 'libgeos' in C++.
##Description of the issue
After last libgeos upgrade I had this trouble:
Shapely install by its own 2 files in this path:
ls <my_path>lib/python3.7/site-packages/shapely/.libs libgeos-3-6a255356.6.2.so libgeos_c-bd8d3f16.so.1.10.2
thess files override the system libgeos: geos-config --version 3.7.0
and cause segfault like this: Thread 1 "python" received signal SIGSEGV, Segmentation fault. 0x00007fffea6abe78 in vtable for _cxxabiv1::_class_type_info () from /usr/lib/libstdc++.so.6 (gdb) bt
#0 0x00007fffea6abe78 in vtable for _cxxabiv1::_class_type_info () from /usr/lib/libstdc++.so.6
#1 0x00007fffd717a0e2 in geos::geom::LineString::apply_rw(geos::geom::CoordinateSequenceFilter&) () from /home/cocco/.virtualenvs/dense_project/lib/python3.7/site-packages/shapely/.libs/./libgeos-3-6a255356.6.2.so
#2 0x00007fffd717d66d in geos::geom::Polygon::apply_rw(geos::geom::CoordinateSequenceFilter&) () from /home/cocco/.virtualenvs/dense_project/lib/python3.7/site-packages/shapely/.libs/./libgeos-3-6a255356.6.2.so
#3 0x00007fffd27f8f84 in geos::geom::util::ComponentCoordinateExtracter::getCoordinates(geos::geom::Geometry const&, std::vector<geos::geom::Coordinate const*, std::allocator<geos::geom::Coordinate const*> >&) () from /usr/lib/libgeos-3.7.0.so
#4 0x00007fffd27fc6c5 in geos::geom::prep::BasicPreparedGeometry::BasicPreparedGeometry(geos::geom::Geometry const*) () from /usr/lib/libgeos-3.7.0.so
Steps to reproduce the problem.
I have not been able to reproduce the problem in OSX, the problem arises when Shapely install those files and the system version is not 3.6x.
Operating system
I am running Arch Linux but installing in virtualenv via pip
Activity
sgillies commentedon Oct 31, 2018
The Shapely wheels on PyPI contain their own version of GEOS and you will need to avoid them by using pip's
--no-binaryoption:pip install --no-binary shapely shapely(yes, "shapely" twice, the first is the value for the
--no-binaryoption.)This will install a shapely package which has extension modules linked against your system GEOS library.