Spyder 5.2.0 (installed with Conda) complains about missing dependency: Rtree >= 0.9.7 : None (NOK)
Using conda 4.10.3 on Windows 10 64-bit.
Installed Spyder 5.2.0 from conda-forge, and rtree 0.9.7 was downloaded and deployed automatically. So far so good. However, shortly after starting Spyder the missing dependency error pops up.
Copying the missing spatialindex_c-64.dll to ...miniconda3\envs\<env name>\Lib\site-packages\rtree is a suitable workaround, which suggests that the problem is with how rtree looks for the dll.
It seems to me that the root of the issue is in finder.py. Line 58 is currently :
rt = ctypes.cdll.LoadLibrary(os.path.join(path, lib_name))
but I think it should rather read
rt = ctypes.cdll.LoadLibrary(lib_name)
In my case at least this solves the problem.
+1
@bghadam, folks,
Line 58 is for os.name == 'nt', os.name == 'posix' is farther down.
On Macos 10.14 with Miniconda3-py37_4.10.3-MacOSX-x86_64.pkg I had to
cd /opt/miniconda3/lib/python3.7/site-packages/rtree
ln -s /opt/miniconda3/lib/libspatialindex_c.6.1.1.dylib libspatialindex_c.dylib
(Imho, it would be nice if rtree wheels just worked, i.e. had the .dylib inside.
Maybe this used to work, see the comments in rtree setup.py;
the finder approach is almost impossible to test thoroughly, so breaks easily, and does break.)
@denis-bz
@bghadam, folks, Line 58 is for
os.name == 'nt',os.name == 'posix'is farther down.
I am using Windows, so this is the bit that applies to my situation.