gpt4 book ai didi

python-2.7 - python 上的 libspatialindex 和 Rtree

转载 作者:太空宇宙 更新时间:2023-11-03 16:45:04 25 4
gpt4 key购买 nike

好的,所以我正在尝试将 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”。至少我的系统 (Mint 17.1) 是这样,它应该与默认的 Ubuntu 安装 100% 兼容。

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com