To efficiently analyse spatial data with Python, I use the rtree spatial index library, relying on the libspatialindex C library.
I am able to successfully install rtree in the Google Colaboratory notebook using !pip install rtree
.
As expected, this is not sufficient, as libspatialindex needs to be installed first, as confirmed by import rtree
resulting in:
OSError: Could not find libspatialindex_c library file
I am unsure whether and how to install external libraries in the Google Collaboratory. Following https://github.com/libspatialindex/libspatialindex/wiki/1.-Getting-Started I managed to run !curl -L http://download.osgeo.org/libspatialindex/spatialindex-src-1.8.5.tar.gz | tar xz
but I do not have permissions for configure:
!spatialindex-src-1.8.5/configure
/bin/sh: 1: spatialindex-src-1.8.5/configure: Permission denied