Open Samk19 opened 3 years ago
@samk19, are you using Spyder installed in Anaconda? If you are using either Windows or macOS, I would recommend using the standalone applications which should include the required spatialindex libraries.
I am using anconda on pop os (linux) Cannot find stand alone application for linux on the above github page
Though spyder recognised rtree after i use sudo apt install libspatialindex-dev..... no idea if its a permanent fix or a temporary one though
Spyder (anaconda) dependencies after using above command:
Mandatory: atomicwrites >=1.2.0 : 1.4.0 (OK) chardet >=2.0.0 : 4.0.0 (OK) cloudpickle >=0.5.0 : 1.6.0 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree >=3.0.2 : 3.1.0 (OK) IPython >=7.6.0 : 7.21.0 (OK) jedi =0.17.2 : 0.17.2 (OK) jsonschema >=3.2.0 : 3.2.0 (OK) keyring >=17.0.0 : 22.3.0 (OK) nbconvert >=4.0 : 6.0.7 (OK) numpydoc >=0.6.0 : 1.1.0 (OK) parso =0.7.0 : 0.7.0 (OK) pexpect >=4.4.0 : 4.8.0 (OK) pickleshare >=0.4 : 0.7.5 (OK) psutil >=5.3 : 5.8.0 (OK) pygments >=2.0 : 2.8.0 (OK) pylint >=1.0 : 2.7.2 (OK) pyls >=0.36.2;<1.0.0 : 0.36.2 (OK) pyls_black >=0.4.6 : 0.4.6 (OK) pyls_spyder >=0.3.0 : 0.3.2 (OK) qdarkstyle >=2.8 : 2.8.1 (OK) qtawesome >=0.5.7 : 1.0.1 (OK) qtconsole >=5.0.1 : 5.0.2 (OK) qtpy >=1.5.0 : 1.9.0 (OK) rtree >=0.8.3 : 0.9.4 (OK) setuptools >=39.0.0 : 52.0.0.post20210125 (OK) sphinx >=0.6.6 : 3.5.1 (OK) spyder_kernels >=1.10.1;<1.11.0 : 1.10.2 (OK) textdistance >=4.2.0 : 4.2.1 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog >=0.10.3 : 1.0.2 (OK) xdg >=0.26 : 0.27 (OK) zmq >=17 : 20.0.0 (OK)
Optional: cython >=0.21 : 0.29.22 (OK) matplotlib >=2.0.0 : 3.3.4 (OK) numpy >=1.7 : 1.19.2 (OK) pandas >=1.1.1 : 1.2.3 (OK) scipy >=0.17.0 : 1.6.1 (OK) sympy >=0.7.3 : 1.7.1 (OK)
The @conda-forge recipe for Rtree includes libspatialindex. I'm not sure what the bug is in this particular configuration, and I am not sure on the distinction of Spyder with any other Conda tooling.
@Samk19, Spyder does not have a standalone application for Linux distributions, only Windows and macOS. I'm not familiar with "pop os" and don't know if Spyder has been tested on that flavor of Linux. Nevertheless, I think it should work. There are a few things to note:
I recommend attempting one of the following to solve your issue.
conda install -c conda-forge rtree=0.9.7
.@mrclary tried conda-forge method earlier but it didnt work.....got the same error also tried uninstalling spyder , rtree and spatialindex and re intalling them with conda-forge.....result was still the same rtree error when opening spyder Also tried to install with pip tooo still error showed up
only developer version of spatialindex solved the problem
also tried on Ubuntu same problem but after installing developer version of spatialindex problem solved......but no idea if its a permanent soln of a temp one or of it creates other errors due to developer version of spatialindex installed
@Samk19, sorry that you are having such trouble. I'm not sure what the problem could be, however I'm glad you were able to get it to work. rtree
(and spatialindex) are only used for snippets; if you don't use snippets, then this should not cause you any issues whatsoever. If you do use snippets, please report back and let me know if there are any problems. However, I'd recommend moving the issue over to Spyder's Github project, not here at rtree.
Not quite sure it's rtree's problem or Python 3.8.8's problem, but they can't work well together. With Python 3.8.8 even rtree can not be imported (no problem with Python 3.8.5) - see below a test with ipython:
Python 3.8.8 (default, Feb 24 2021, 21:46:12) Type 'copyright', 'credits' or 'license' for more information IPython 7.21.0 -- An enhanced Interactive Python. Type '?' for help.
AttributeError Traceback (most recent call last)
The error message is: ~/anaconda3/lib/python3.8/site-packages/rtree/core.py in 141 raise RTreeError('Unsupported OS "%s"' % os.name)
for windows users: cgohlke just re-released rtree-0.9.7 wheels today.
I just installed spyder 4.2.1 (conda-forge) into a conda environment running Python 3.7.9. When I start spyder, a window pops up and states that a dependency is missing, namely rtree >=0.8.3.
However, rtree 0.9.5 is installed.
Removing/reinstalling rtree and spyder doesn't stop the warning.
Some temporary solution from spyder github i got were, that the spyder message about rtree disapears, when copy "spatialindex_c-64.dll" into the rtree folder.
Any permanent solution?