首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >缺少rtree的依赖项

缺少rtree的依赖项
EN

Stack Overflow用户
提问于 2020-01-30 16:39:42
回答 4查看 11.1K关注 0票数 9

我目前正在使用Spyder for Python,当我打开该程序时,我收到以下错误消息: Error: You have missing dependencies!

rtree>= 0.8.3:无(无)

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

注意: Spyder可以在没有这些依赖的情况下工作,但是为了有一个流畅的体验,我们强烈建议。

我尝试了pip install rtree,得到了:

代码语言:javascript
运行
复制
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 "", line 1, in 
      File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\setup.py", line 3, in 
        import rtree
      File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\rtree\__init__.py", line 1, in 
        from .index import Rtree
      File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\rtree\index.py", line 6, in 
        from . import core
      File "C:\Users\gitte\AppData\Local\Temp\pip-install-kmbt5h2t\rtree\rtree\core.py", line 128, in 
        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运行得很好,我只是不想在这个过程中遇到问题。谢谢!

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2020-03-04 03:59:30

看起来Rtree需要libspatialindex (

https://libspatialindex.org

),它不会自动安装。似乎一些开发人员已经意识到了这个问题,并正在努力解决这个问题:

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

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

票数 7
EN

Stack Overflow用户

发布于 2020-03-14 03:22:33

带着同样的问题来到这里,我没有使用

并且无法安装

使用

代码语言:javascript
运行
复制
# macOS Mojave 10.14.5
# python 3.7.4 (via pyenv)

Error: Command "python setup.py egg_info" failed with error code 1 in /var/folders/r7/2sx1wsvx0gj5x43wkmymg61w0000gq/T/tmpn09357tzbuild/rtree/

找到

解决方案

-安装

通过Homebrew:

代码语言:javascript
运行
复制
brew install spatialindex

然后

成功了,现在

工作顺畅

希望能有所帮助

票数 6
EN

Stack Overflow用户

发布于 2021-02-26 22:30:16

我也是带着同样的问题来到这里的。在我的例子中(

),当我尝试安装

使用

,问题

仍然坚持。

但是,当我用以下命令检查它的安装时

..。它已经通过以下命令显示了它的成功安装

..。尽管如此,我还是尝试安装了

包含两者的包

或者

..。所有这些都没有成功。

之后,我尝试了不同的安装命令(基本上,使用不同的conda通道),然后,这个问题就消失了。请注意,它在下面使用了

下载spyder的通道。

代码语言:javascript
运行
复制
conda create --name spy42py38 python==3.8
conda install spyder=4.2.1 -c conda-forge
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59981914

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档