Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtree >=0.9.7 says i need it, it's installed #17530

Closed
Lexonight1 opened this issue Mar 23, 2022 · 7 comments
Closed

rtree >=0.9.7 says i need it, it's installed #17530

Lexonight1 opened this issue Mar 23, 2022 · 7 comments

Comments

@Lexonight1
Copy link

I start Spyder after it errored out with run_sync in Jupyter, spyder --reset fixed that
but everytime i start it up it says missing dependency rtree >=0.9.7
pip install -U rtree Requirement already satisfied: rtree in ./bin/spyder-env/lib/python3.10/site-packages (0.9.7)
probably a simple fix

@mrclary
Copy link
Contributor

mrclary commented Mar 24, 2022

@Lexonight1, thanks for reporting this issue. Can you provide the information?

  • operating system
  • environment (conda, venv, etc.)
  • Spyder version

@dalthviz
Copy link
Member

Also @Lexonight1 could you try to import rtree from the console and check if any error raises? In the past we have received some issues regarding faulty rtree installations like for example #17165

Let us know!

@ccordoba12
Copy link
Member

A bit of additional information: according to the maintainer of Rtree, this problem should be fixed in its next version (see #17165 (comment)). However, we don't know when that's going to happen.

@Lexonight1
Copy link
Author

Lexonight1 commented Mar 26, 2022

my bad been busy

operating system : Fedora 35
environment (conda, venv, etc.): venv
Spyder version : 5.2.2

from the venv

    (spyder-env) [~@Servername spyder-env]$ python
    Python 3.10.2 (main, Jan 17 2022, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import rtree
   Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/~/bin/spyder-env/lib64/python3.10/site-packages/rtree/__init__.py", line 9, in <module>
        from .index import Rtree, Index  # noqa
      File "/home/~/bin/spyder-env/lib64/python3.10/site-packages/rtree/index.py", line 6, in <module>
        from . import core
      File "/home/~/bin/spyder-env/lib64/python3.10/site-packages/rtree/core.py", line 77, in <module>
        rt.Error_GetLastErrorNum.restype = ctypes.c_int
      File "/usr/lib64/python3.10/ctypes/__init__.py", line 387, in __getattr__
        func = self.__getitem__(name)
      File "/usr/lib64/python3.10/ctypes/__init__.py", line 392, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: python: undefined symbol: Error_GetLastErrorNum

removed rtree from pip in the venv, reinstalling in venv

(spyder-env) [~@servername spyder-env]$ pip install rtree --no-cache-dir
Collecting rtree
  Downloading Rtree-0.9.7.tar.gz (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.9/44.9 KB 237.2 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: rtree
  Building wheel for rtree (pyproject.toml) ... done
  Created wheel for rtree: filename=Rtree-0.9.7-cp310-cp310-linux_x86_64.whl size=22594                                                                sha256=551fd35198cdf9cd7674717c319b380ed2aae94ca2bba23eb501fe2f0fcc2028
  Stored in directory: /tmp/pip-ephem-wheel-cache-i38mwlq3/wheels/73/d6    /f9/0d2ccc59a164e651f30351d842e818cce42681734499d6ce25
Successfully built rtree
Installing collected packages: rtree
Successfully installed rtree-0.9.7

same result missing warning

@mrclary
Copy link
Contributor

mrclary commented Mar 26, 2022

@Lexonight1, thanks for posting that. The Rtree wheels are supposed to be built with spatialindex dynamic libraries, however, as reported in #17165, there seems to be an issue with Rtree's wheels for Linux distributions on pip (I don't know if that's also true for conda) and may be fixed with Rtree's next release. I believe this should only impact the code snippets functionality in Spyder.

@aozkesek
Copy link

aozkesek commented Apr 1, 2022

I had same issue, basicaly I installed spatialindex and spatialindex-devel packages manually which were not installed on my system Fedora-35 before, then problem solved.

@dalthviz
Copy link
Member

Closing as duplicate of #17165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants