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