rtree: Build fails on OS X
Building rtree on OS X either from the current release or from master results in a failure:
$ pip install git+git://github.com/Toblerity/rtree.git
Downloading/unpacking git+git://github.com/Toblerity/rtree.git
Cloning git://github.com/Toblerity/rtree.git to /var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build
Running setup.py (path:/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/setup.py) egg_info for package from git+git://github.com/Toblerity/rtree.git
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/setup.py", line 4, in <module>
import rtree
File "/private/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/rtree/__init__.py", line 1, in <module>
from .index import Rtree
File "/private/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/rtree/index.py", line 6, in <module>
from . import core
File "/private/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/rtree/core.py", line 110, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/__init__.py", line 364, in __getattr__
func = self.__getitem__(name)
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/__init__.py", line 369, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/setup.py", line 4, in <module>
import rtree
File "/private/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/rtree/__init__.py", line 1, in <module>
from .index import Rtree
File "/private/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/rtree/index.py", line 6, in <module>
from . import core
File "/private/var/folders/z_/kgsm76k94s7_jhnkfydfnd380000gn/T/pip-p4_3c96t-build/rtree/core.py", line 110, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/__init__.py", line 364, in __getattr__
func = self.__getitem__(name)
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/__init__.py", line 369, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found
Running Python 3.4.2 on OS X 10.10.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (3 by maintainers)
Even though this is closed, i landed here, but found the best solution in a different issue, not #74, the solution was simply
brew install spatialindex(https://github.com/gboeing/osmnx/issues/3)Surprisingly the brew install spatialindex seems to be not the solution. (anymore?) The error persisted.
brew install spatialindex Warning: spatialindex 1.9.3 is already installed and up-to-date
pip3 install rtree
Collecting rtree
Using cached Rtree-0.9.4.tar.gz (62 kB)
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
As it concerns my problem I have the solution:
Actually, I want to correct my comment.
Python 3.7.7 +
brew install spatialindexworks perfectly.