UPDATE:
If it also helps. I have root access. Seems like I am not the only with the problem, but a couple had this problems https://github.com/ioos/conda-recipes/pull/198 I had updated my core.py accordingly as documented in the link however I get a new error.
python setup.py build
Traceback (most recent call last):
File "setup.py", line 4, in <module>
import rtree
File "/home/ricson/Rtree-0.8.2/rtree/__init__.py", line 1, in <module>
from .index import Rtree
File "/home/ricson/Rtree-0.8.2/rtree/index.py", line 6, in <module>
from . import core
File "/home/ricson/Rtree-0.8.2/rtree/core.py", line 113, in <module>
rt = ctypes.CDLL(os.path.join(sys.prefix, 'lib', lib_name))
File "/usr/lib64/python2.6/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libspatialindex_c.so: cannot open shared object file: No such file or directory
I do know that this is a directory issue but I did not install anything our of the ordinary. I installed libspatialindex 1.8.5 using .configure; make; make install; ldconfig; no more not less.
I am able to build and execute if I change
rt = ctypes.CDLL(os.path.join(sys.prefix, 'lib', lib_name))
to
rt = ctypes.CDLL(os.path.join(sys.prefix, 'local/lib', lib_name))
However, Rtree will fail 3 out of the 6 tests.
ORIGINAL:
I am trying to install Rtree module on python 2.6.6 however setup.py insists that I have libspatialindex 1.6 when I have clearly just installed libspatialindex 1.8.5
Did I miss some steps? The script below as prescribe by libspatialindex owner does return 1.8.5 (https://github.com/libspatialindex/libspatialindex/wiki/1.-Getting-Started)
#include <iostream>
#include <spatialindex/capi/sidx_api.h>
using namespace std;
using namespace SpatialIndex;
int main(int argc, char* argv[])
{
char* pszVersion = SIDX_Version();
fprintf(stdout, "libspatialindex version: %s\n", pszVersion);
fflush(stdout);
free(pszVersion);
}
However when I edited index.py in Rtree and I get version 1.6.1 when I have clearly installed 1.8.5
python ../setup.py
core.rt.SIDX_Version() 1.6.1
Traceback (most recent call last):
File "../setup.py", line 4, in <module>
import rtree
File "/home/ricson/Rtree-0.8.2/rtree/__init__.py", line 1, in <module>
from .index import Rtree
File "/home/ricson/Rtree-0.8.2/rtree/index.py", line 39, in <module>
raise Exception("This version of Rtree requires libspatialindex 1.7.0 or greater")
Exception: This version of Rtree requires libspatialindex 1.7.0 or greater
Let me know if this needs to be moved to serverfault. Thanks in advance.