Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing dependancies of rtree

Tags:

python

spyder

I am currently using Spyder for Python, and I have this error message when I open the program: Error: You have missing dependencies!

rtree>= 0.8.3: None (NOK)

Please install them to avoid this message.

Note: Spyder could work without some of these dependencies, however to have a smooth experience, we strongly recommend.

I tried pip install rtree and got:

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.

Please advise what I can do. Spyder works great so far, I just don't want to have issues along the way. Thanks!

like image 726
Unicorn_tech Avatar asked Jan 30 '20 08:01

Unicorn_tech


People also ask

How do I get Maven dependency tree?

How to get the Maven Dependency Tree of a Project. We can run mvn dependency:tree command in the terminal to print the project dependency tree. For our example, I will be using the Mockito Tutorial project. You can download the project from the GitHub repository.

What is mvn dependency tree?

A project's dependency tree can be filtered to locate specific dependencies. For example, to find out why Velocity is being used by the Maven Dependency Plugin, we can execute the following in the project's directory: mvn dependency:tree -Dincludes=velocity:velocity.

How do I create a missing dependency in Maven?

Right-click on the project and choose Properties, and then Maven. Uncheck the box labeled "Resolve dependencies from Workspace projects" Hit Apply, and then OK. Right-click again on your project and do a Maven->Update Snapshots (or Update Dependencies)

How do I fix missing Maven dependencies in eclipse?

You can find this in Window > Preferences > Maven > User Settings , and then point Global Settings to your external maven settings. xml . Then i removed the broken projects and re-added them, and the Maven Dependencies library appeared again.


1 Answers

It looks like Rtree requires libspatialindex (https://libspatialindex.org) which is not automatically installed. It seems some devs are aware of the problem and working on a fix:

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

like image 167
David Avatar answered Sep 20 '22 08:09

David