MacOS Python Rtree installation OSError: dlopen(libspatialindex_c.dylib, 6): image not found.
MacOS Python Rtree安装OSError: dlopen(libspatialindex_c)。dylib, 6):图像未找到。
I followed the instruction on http://toblerity.org/rtree/install.html#nix as below:
我遵循了http://tobl厄立特里亚.org/rtree/install.html#nix的指示:
First, download and install version 1.7.0 of the libspatialindex library from:
首先,下载并安装libspatialindex库的1.7.0版本:
$ ./configure; make; make install
美元。/配置;使;制作安装
But when I did :
但当我这么做的时候:
$ pip install Rtree.
pip安装Rtree美元。
I received the following error:
我收到了以下错误:
Downloading/unpacking rtree Downloading Rtree-0.7.0.tar.gz (44kB): 44kB downloaded Running setup.py (path:/private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree/setup.py) egg_info for package rtree Traceback (most recent call last): File "", line 17, in File "/private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree/setup.py", line 5, in import rtree File "rtree/__init__.py", line 1, in from index import Rtree File "rtree/index.py", line 2, in import core File "rtree/core.py", line 85, in rt = ctypes.CDLL(lib_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(libspatialindex_c.dylib, 6): image not found Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 17, in File "/private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree/setup.py", line 5, in import rtree File "rtree/__init__.py", line 1, in from index import Rtree File "rtree/index.py", line 2, in import core File "rtree/core.py", line 85, in rt = ctypes.CDLL(lib_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(libspatialindex_c.dylib, 6): image not found ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree Storing debug log for failure in /Users/bdcoe/Library/Logs/pip.log
1 个解决方案
#1
1
Looks like the shared library wasn't installed into a directory that python uses for searching. Try to figure out:
看起来共享库没有安装到python用于搜索的目录中。试着找出:
-
Which directory the library was installed to
将库安装到哪个目录?
-
Which directories are searched by python
python会搜索哪些目录?
-
How to add the directory from #1 to the list in #2, or which parameters to pass to
./configure
to install the library into one of the directorys of #2.如何将该目录从#1添加到#2中的列表,或将该目录传递到./configure以将库安装到#2的一个directorys中。
#1
1
Looks like the shared library wasn't installed into a directory that python uses for searching. Try to figure out:
看起来共享库没有安装到python用于搜索的目录中。试着找出:
-
Which directory the library was installed to
将库安装到哪个目录?
-
Which directories are searched by python
python会搜索哪些目录?
-
How to add the directory from #1 to the list in #2, or which parameters to pass to
./configure
to install the library into one of the directorys of #2.如何将该目录从#1添加到#2中的列表,或将该目录传递到./configure以将库安装到#2的一个directorys中。