MacOS Python Rtree 安装 OSError: dlopen(libspatialindex_c.dylib, 6): image not found。
我按照http://toblerity.org/rtree/install.html#nix上的说明进行操作,如下所示:
首先,从以下位置下载并安装libspatialindex库的 1.7.0 版本:
$ ./配置;制作; 进行安装
但是当我这样做时:
$ pip 安装 Rtree。
我收到以下错误:
下载/解压rtree
下载 Rtree-0.7.0.tar.gz (44kB):已下载 44kB
运行 setup.py (path:/private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree/setup.py) egg_info for package rtree
回溯(最近一次通话最后):
文件“”,第 17 行,在
文件“/private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree/setup.py”,第 5 行,在
导入rtree
文件“rtree/__init__.py”,第 1 行,在
从索引导入 Rtree
文件“rtree/index.py”,第 2 行,在
进口核心
文件“rtree/core.py”,第 85 行,在
rt = ctypes.CDLL(lib_name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py”,第 365 行,在 __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libspatialindex_c.dylib, 6): image not found
命令 python setup.py egg_info 的完整输出:
回溯(最近一次通话最后):
文件“”,第 17 行,在
文件“/private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree/setup.py”,第 5 行,在
导入rtree
文件“rtree/__init__.py”,第 1 行,在
从索引导入 Rtree
文件“rtree/index.py”,第 2 行,在
进口核心
文件“rtree/core.py”,第 85 行,在
rt = ctypes.CDLL(lib_name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py”,第 365 行,在 __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libspatialindex_c.dylib, 6): image not found
--------------------------------------
打扫干净...
命令 python setup.py egg_info 失败,错误代码 1 在 /private/var/folders/zv/1hqhxh0n6m374cwzysmdn6zc0000gn/T/pip_build_bdcoe/rtree
在 /Users/bdcoe/Library/Logs/pip.log 中存储失败的调试日志