好的,所以我试图将libspatialspatialindex安装到我的Ubuntu计算机python中。我确实遵循了所有说明,并从http://packages.ubuntu.com/lucid/libspatialindex1下载了libspatialindex1_1.4.0-1.1_amd64.deb并下载了amd64版本,因为我的机器是64位机器。我安装了它,然后跳到Rtree python https://pypi.python.org/pypi/Rtree以在python中下载并安装Rtree。我按照该文件夹内install.txt文件中给出的安装说明进行操作。它说通过$ python setup.py install运行本地setup.py我也这样做,但是之后我得到的是

`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`


有人可以帮我解决这个问题!

我真的很感激!

最佳答案

您必须使用系统软件包管理器来安装软件包“ libspatialindex-dev”。至少对于我的系统(薄荷17.1)而言,这是正确的,它应该与默认的Ubuntu安装100%兼容。

关于python-2.7 - python上的libspatialindex和Rtree,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28491322/

10-12 21:59
查看更多