Skip to content

Instantly share code, notes, and snippets.

@nutjob4life
Created August 12, 2014 15:51
Show Gist options
  • Save nutjob4life/9a9bb9803aa67ca51aec to your computer and use it in GitHub Desktop.
Save nutjob4life/9a9bb9803aa67ca51aec to your computer and use it in GitHub Desktop.
Shapely with libgeos-dev, python-numpy, and cython installed
Running setup.py install for Shapely
building 'shapely.speedups._speedups' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include -I/usr/include/python2.7 -c shapely/speedups/_speedups.c -o build/temp.linux-x86_64-2.7/shapely/speedups/_speedups.o
shapely/speedups/_speedups.c: In function ‘__pyx_pf_7shapely_8speedups_9_speedups_2geos_linestring_from_py’:
shapely/speedups/_speedups.c:1533:20: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
shapely/speedups/_speedups.c:1891:20: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
shapely/speedups/_speedups.c: In function ‘__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py’:
shapely/speedups/_speedups.c:2575:20: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
shapely/speedups/_speedups.c:3021:20: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
shapely/speedups/_speedups.c: At top level:
shapely/speedups/_speedups.c:829:28: warning: ‘__pyx_f_7shapely_8speedups_9_speedups_get_geos_context_handle’ defined but not used [-Wunused-function]
shapely/speedups/_speedups.c:908:30: warning: ‘__pyx_f_7shapely_8speedups_9_speedups_geos_from_prepared’ defined but not used [-Wunused-function]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/shapely/speedups/_speedups.o -lgeos_c -o build/lib.linux-x86_64-2.7/shapely/speedups/_speedups.so
cythoning shapely/vectorized/_vectorized.pyx to shapely/vectorized/_vectorized.c
Error compiling Cython file:
------------------------------------------------------------
...
GEOSGeometry *GEOSGeom_createLineString_r(GEOSContextHandle_t, GEOSCoordSequence *) nogil
GEOSGeometry *GEOSGeom_createLinearRing_r(GEOSContextHandle_t, GEOSCoordSequence *) nogil
void GEOSGeom_destroy_r(GEOSContextHandle_t, GEOSGeometry *) nogil
char GEOSPreparedContains_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
^
------------------------------------------------------------
shapely/vectorized/../_geos.pxi:30:79: Expected ')', found '*'
building 'shapely.vectorized._vectorized' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include -I/usr/lib/pymodules/python2.7/numpy/core/include -I/usr/include/python2.7 -c shapely/vectorized/_vectorized.c -o build/temp.linux-x86_64-2.7/shapely/vectorized/_vectorized.o
shapely/vectorized/_vectorized.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
command 'gcc' failed with exit status 1
Warning: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
I'm retrying the build without the C extension now.
Warning: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
Successfully installed Shapely
Cleaning up...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment