好的,我正在尝试将libspatialspatialindex安装到我的Ubuntu机上。我确实遵循了所有的说明,从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`有人能帮我解决这个问题吗?
我真的很感谢提前!
发布于 2015-03-13 08:47:27
您必须使用系统包管理器安装"libspatialindex-dev“包。至少我的系统(Mint 17.1)是这样的,它应该与默认的Ubuntu安装100%兼容。
发布于 2021-05-29 15:14:45
你必须在你的ubuntu系统中安装libspatialindex-dev。这里我使用的是ubuntu 16.04或18.04
sudo apt update
sudo apt install libspatialindex-dev
使用您的python pip版本安装Rtree,我有pip 3.7
pip3.7 install Rtree
import rtree
https://stackoverflow.com/questions/28491322
复制相似问题