libspatialindex and Rtree on python

丶灬走出姿态 提交于 2020-01-22 14:37:28

问题


Okay, so I am trying to install libspatialspatialindex to my Ubuntu machine python. I did follow all the instructions and downloaded libspatialindex1_1.4.0-1.1_amd64.deb from http://packages.ubuntu.com/lucid/libspatialindex1 and downloaded the amd64 version of it as my machine is 64bits machine. I installed it and then jumped to Rtree python https://pypi.python.org/pypi/Rtree to download and install the Rtree in python. I followed the installation instruction given in the install.txt file inside the folder. It says run the local setup.py by $ python setup.py install I did that as well but what I get after that is

`root@ubuntu:/# cd /home/neelabh/Desktop/Rtree
root@ubuntu:/home/neelabh/Desktop/Rtree# python setup.py install
Traceback (most recent call last):
File "setup.py", line 4, in <module>
import rtree
File "/home/neelabh/Desktop/Rtree/rtree/__init__.py", line 1, in <module>
from .index import Rtree
File "/home/neelabh/Desktop/Rtree/rtree/index.py", line 6, in <module>
from . import core
File "/home/neelabh/Desktop/Rtree/rtree/core.py", line 110, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File "/usr/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: python: undefined symbol: Error_GetLastErrorNum`

Can somebody please help me in resolving this issue!

I really appreciate in advance!


回答1:


You have to install the package "libspatialindex-dev" with the systems package manager. At least this is true with my system (Mint 17.1) which should be 100% compatible to a default Ubuntu installation.



来源:https://stackoverflow.com/questions/28491322/libspatialindex-and-rtree-on-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!