Discussion:
[Community] Rtree installation problems
Christian Ledermann
2010-06-09 15:37:20 UTC
Permalink
Hi,

I have problems getting Rtree to run.

when i start up zope (with zgeo.wfs) i get the error:
---------------
...
from index import BaseIndex
File
"/home/ledermac/devel/plone4zgeo/zinstance/src/zgeo.wfs/zgeo/wfs/geocatalog/index.py", line 4, in <module>
from rtree import Rtree
File
"/home/ledermac/.buildout/eggs/Rtree-0.6.0-py2.6.egg/rtree/__init__.py",
line 8, in <module>
from index import Rtree
File
"/home/ledermac/.buildout/eggs/Rtree-0.6.0-py2.6.egg/rtree/index.py",
line 2, in <module>
import core
File
"/home/ledermac/.buildout/eggs/Rtree-0.6.0-py2.6.egg/rtree/core.py",
line 85, in <module>
rt = ctypes.CDLL(lib_name)
File
"/home/ledermac/devel/plone4zgeo/Python-2.6/lib/python2.6/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"/home/ledermac/devel/plone4zgeo/zinstance/parts/instance/etc/site.zcml", line 15.2-15.55
ZopeXMLConfigurationError: File
"/home/ledermac/devel/plone4zgeo/zinstance/parts/instance/etc/package-includes/008-zgeo.wfs-configure.zcml", line 1.0-1.52
ZopeXMLConfigurationError: File
"/home/ledermac/devel/plone4zgeo/zinstance/src/zgeo.wfs/zgeo/wfs/configure.zcml", line 9.4-13.4
OSError: libspatialindex_c.so: cannot open shared object file: No
such file or directory
-----------------------

libspatialindex_c.so is present in /usr/local/lib/

#ls -l /usr/local/lib/
total 2792
-rw-r--r-- 1 root root 1465800 2010-06-09 12:58 libspatialindex.a
-rw-r--r-- 1 root root 236400 2010-06-09 12:58 libspatialindex_c.a
-rwxr-xr-x 1 root root 1042 2010-06-09 12:58 libspatialindex_c.la
lrwxrwxrwx 1 root root 26 2010-06-09 12:58 libspatialindex_c.so
-> libspatialindex_c.so.1.0.0
lrwxrwxrwx 1 root root 26 2010-06-09 12:58 libspatialindex_c.so.1
-> libspatialindex_c.so.1.0.0
-rwxr-xr-x 1 root root 162913 2010-06-09 12:58
libspatialindex_c.so.1.0.0
-rwxr-xr-x 1 root root 985 2010-06-09 12:58 libspatialindex.la
lrwxrwxrwx 1 root root 24 2010-06-09 12:58 libspatialindex.so ->
libspatialindex.so.1.0.0
lrwxrwxrwx 1 root root 24 2010-06-09 12:58 libspatialindex.so.1
-> libspatialindex.so.1.0.0
-rwxr-xr-x 1 root root 934342 2010-06-09 12:58
libspatialindex.so.1.0.0


I installed spatialindex-src-1.5.0.tar.gz but also have an older version
in /usr/lib

the python i am using is the one from the plone 4 installer.

Any pointers?
--
Best regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 729495789

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

}<(((*>
Sean Gillies
2010-06-10 08:21:19 UTC
Permalink
On Wed, Jun 9, 2010 at 5:37 PM, Christian Ledermann
Post by Christian Ledermann
Hi,
I have problems getting Rtree to run.
---------------
...
?from index import BaseIndex
?File
"/home/ledermac/devel/plone4zgeo/zinstance/src/zgeo.wfs/zgeo/wfs/geocatalog/index.py", line 4, in <module>
? ?from rtree import Rtree
?File
"/home/ledermac/.buildout/eggs/Rtree-0.6.0-py2.6.egg/rtree/__init__.py",
line 8, in <module>
? ?from index import Rtree
?File
"/home/ledermac/.buildout/eggs/Rtree-0.6.0-py2.6.egg/rtree/index.py",
line 2, in <module>
? ?import core
?File
"/home/ledermac/.buildout/eggs/Rtree-0.6.0-py2.6.egg/rtree/core.py",
line 85, in <module>
? ?rt = ctypes.CDLL(lib_name)
?File
"/home/ledermac/devel/plone4zgeo/Python-2.6/lib/python2.6/ctypes/__init__.py", line 353, in __init__
? ?self._handle = _dlopen(self._name, mode)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"/home/ledermac/devel/plone4zgeo/zinstance/parts/instance/etc/site.zcml", line 15.2-15.55
? ?ZopeXMLConfigurationError: File
"/home/ledermac/devel/plone4zgeo/zinstance/parts/instance/etc/package-includes/008-zgeo.wfs-configure.zcml", line 1.0-1.52
? ?ZopeXMLConfigurationError: File
"/home/ledermac/devel/plone4zgeo/zinstance/src/zgeo.wfs/zgeo/wfs/configure.zcml", line 9.4-13.4
? ?OSError: libspatialindex_c.so: cannot open shared object file: No
such file or directory
-----------------------
libspatialindex_c.so is present in /usr/local/lib/
#ls -l /usr/local/lib/
total 2792
-rw-r--r-- ?1 root root ?1465800 2010-06-09 12:58 libspatialindex.a
-rw-r--r-- ?1 root root ? 236400 2010-06-09 12:58 libspatialindex_c.a
-rwxr-xr-x ?1 root root ? ? 1042 2010-06-09 12:58 libspatialindex_c.la
lrwxrwxrwx ?1 root root ? ? ? 26 2010-06-09 12:58 libspatialindex_c.so
-> libspatialindex_c.so.1.0.0
lrwxrwxrwx ?1 root root ? ? ? 26 2010-06-09 12:58 libspatialindex_c.so.1
-> libspatialindex_c.so.1.0.0
-rwxr-xr-x ?1 root root ? 162913 2010-06-09 12:58
libspatialindex_c.so.1.0.0
-rwxr-xr-x ?1 root root ? ? ?985 2010-06-09 12:58 libspatialindex.la
lrwxrwxrwx ?1 root root ? ? ? 24 2010-06-09 12:58 libspatialindex.so ->
libspatialindex.so.1.0.0
lrwxrwxrwx ?1 root root ? ? ? 24 2010-06-09 12:58 libspatialindex.so.1
-> libspatialindex.so.1.0.0
-rwxr-xr-x ?1 root root ? 934342 2010-06-09 12:58
libspatialindex.so.1.0.0
I installed spatialindex-src-1.5.0.tar.gz but also have an older version
in /usr/lib
the python i am using is the one from the plone 4 installer.
Any pointers?
Hi Christian,

First: I am not at all sure that zgeo.wfs works with Rtree 0.6. I
would need some confirmation from Eric Brehault.

You need to put /usr/local/lib ahead of /usr/lib on your library
search path. I wouldn't do this system wide, but would set
LD_LIBRARY_PATH=/usr/local/lib:... within the process running
Zope/Plone. You're using buildout, yes? If so, you can set the path
through an instance buildout option. Otherwise, set it in your start
up script.

Cheers,
--
Sean
Christian Ledermann
2010-06-10 12:40:31 UTC
Permalink
Post by Sean Gillies
First: I am not at all sure that zgeo.wfs works with Rtree 0.6. I
would need some confirmation from Eric Brehault.
OK, Eric are you listening? otherwise I'll contact you off list.
Post by Sean Gillies
You need to put /usr/local/lib ahead of /usr/lib on your library
search path. I wouldn't do this system wide, but would set
LD_LIBRARY_PATH=/usr/local/lib:... within the process running
Zope/Plone. You're using buildout, yes? If so, you can set the path
through an instance buildout option. Otherwise, set it in your start
up script.
Never mind, after a restart this error has gone away. now rtree finds
the library. :)

sorry about the noise.
--
Best regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 729495789

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

}<(((*>
Eric Bréhault
2010-06-10 13:55:09 UTC
Permalink
On Thu, Jun 10, 2010 at 2:40 PM, Christian Ledermann
Post by Christian Ledermann
Post by Sean Gillies
First: I am not at all sure that zgeo.wfs works with Rtree 0.6. I
would need some confirmation from Eric Brehault.
OK, Eric are you listening? otherwise I'll contact you off list.
yes, as I said in my answer to your other post, I am not sure it will
work with Rtree 0.6

let me have a try

Sean, is there a way to reset my svn account password on svn.gispython.org ?

Eric
Post by Christian Ledermann
Post by Sean Gillies
You need to put /usr/local/lib ahead of /usr/lib on your library
search path. I wouldn't do this system wide, but would set
LD_LIBRARY_PATH=/usr/local/lib:... within the process running
Zope/Plone. You're using buildout, yes? If so, you can set the path
through an instance buildout option. Otherwise, set it in your start
up script.
Never mind, after a restart this error has gone away. now rtree finds
the library. :)
sorry about the noise.
--
Best regards,
Christian Ledermann
Nairobi - Kenya
Mobile : +254 729495789
<*)))>{
If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.
}<(((*>
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
Christian Ledermann
2011-08-17 08:37:05 UTC
Permalink
Just for the record:

In another plone installation i ran into the same problem, spatial
index was installed in $HOME:

solution:

in base.cfg add LD_LIBRARY_PATH in the [client1] section in a zeo installation:

[client1]
...
# You may also control the environment variables for the instance.
environment-vars =
PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs
LD_LIBRARY_PATH /home/myuser/lib
Post by Sean Gillies
On Wed, Jun 9, 2010 at 5:37 PM, Christian Ledermann
You need to put /usr/local/lib ahead of /usr/lib on your library
search path. I wouldn't do this system wide, but would set
LD_LIBRARY_PATH=/usr/local/lib:... within the process running
Zope/Plone. You're using buildout, yes? If so, you can set the path
through an instance buildout option. Otherwise, set it in your start
up script.
--
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don?t drive species to extinction

2) Don?t destroy a habitat that species rely on.

3) Don?t change the climate in ways that will result in the above.

}<(((*>
Loading...