Search code examples
pythonwindowscanopyspatial-indexr-tree

Install libspatialindex in windows to enable rtree in Python


I am using a Canopy installation of Python in Windows 7 64bits. Rtree seems to install properly.

However, when I try to import rtree, I get the following error:

WindowsError: [Error 126] The specified module could not be found

I had a similar problem, if not the same, in Ubuntu. I solved it by directly installing the libspatialindex via the Software Manager. This is not possible in Windows and I can not find a clear way to install it.

I downloaded and installed the full OSGeo4W suite, and reinstalled Rtree in Canopy, hoping that libspatialindex was included in the bundle. That did not work.

Is there any way to solve this problem?


Solution

  • Is RTree all you really want? The best source would be Chris Gohlke's build, which you can install into Canopy as described at https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-User-Python-from-the-OS-command-line