gpt4 book ai didi

python - 缺少树的依赖关系

转载 作者:行者123 更新时间:2023-12-03 16:00:12 26 4
gpt4 key购买 nike

我当前正在使用Spyder for Python,打开程序时出现以下错误消息:
错误:
您缺少依赖项!

rtree> = 0.8.3:无(NOK)

请安装它们以避免此消息。

注意:Spyder可以在没有这些依赖项的情况下工作,但是强烈建议您保持平稳的体验。

我尝试了pip install rtree并得到:

Collecting rtree
Downloading https://files.pythonhosted.org/packages/11/1d/42d6904a436076df813d1df632575529991005b33aa82f169f01750e39e4/Rtree-0.9.3.tar.gz (520kB)
|████████████████████████████████| 522kB 467kB/s
ERROR: Command errored out with exit status 1:
command: 'C:\Users\gitte\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gitte\\AppData\\Local\\Temp\\pip-install-kmbt5h2t\\rtree\\setup.py'"'"'; __file__='"'"'C:\\Users\\gitte\\AppData\\Local\\Temp\\pip-install-kmbt5h2t\\rtree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\setup.py", line 3, in <module>
import rtree
File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\rtree\__init__.py", line 1, in <module>
from .index import Rtree
File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\rtree\index.py", line 6, in <module>
from . import core
File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\rtree\core.py", line 128, in <module>
raise OSError("could not find or load %s" % lib_name)
OSError: could not find or load spatialindex_c-64.dll
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

请告知我该怎么做。到目前为止,Spyder的运行情况非常好,我只是不想在此过程中遇到任何问题。谢谢!

最佳答案

看起来Rtree需要没有自动安装的libspatialindex(https://libspatialindex.org)。似乎有些开发人员已经意识到了这个问题,并着手进行修复:

https://github.com/Toblerity/rtree/issues/146
https://github.com/Toblerity/rtree/issues/147

关于python - 缺少树的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59981914/

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