1. 首先安装依赖libspatialindex
http://libspatialindex.github.io/sudo ./configure
sudo make
sudo make install
注意这一步,一定要有:
运行sudo ldconfig将lib更新到配置中。
2. 下载https://pypi.python.org/packages/source/R/Rtree/Rtree-0.8.2.tar.gz
sudo python setup.py buildsudo python setup.py installsudo python setup.py test
如果出现错误OSError: libspatialindex_c.so.4: cannot open shared object file: No such file or director
把动态链接库所在的路径添加到/etc/ld.so.conf中include /etc/ld.so.conf.d/*.conf/usr/local/lib/然后更新/etc/so.cachesudo ldconfig