【发布时间】:2022-09-29 19:12:52
【问题描述】:
我目前正在尝试在 Python3.7.9 中安装 rtree 的 0.9.4 版本。但是,我不断收到以下错误。不过,我可以安装任何版本的 rtree>=0.9.5。问题是我真的需要 0.9.4 版本。
Collecting rtree==0.9.4
Using cached Rtree-0.9.4.tar.gz (62 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status \'error\'
ERROR: Command errored out with exit status 1:
command: /Users/paulonascimento/Desktop/nooo/pychop3d-master/venv/bin/python -c \'import io, os, sys, setuptools, tokenize; sys.argv[0] = \"\"\'/private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/setup.py\"\"\'; __file__=\"\"\'/private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/setup.py\"\"\';f = getattr(tokenize, \"\"\'open\"\"\', open)(__file__) if os.path.exists(__file__) else io.StringIO(\"\"\'from setuptools import setup; setup()\"\"\');code = f.read().replace(\"\"\'\\r\\n\"\"\', \"\"\'\\n\"\"\');f.close();exec(compile(code, __file__, \"\"\'exec\"\"\'))\' egg_info --egg-base /private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-pip-egg-info-uk6yo3dc
cwd: /private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/
Complete output (15 lines):
Traceback (most recent call last):
File \"<string>\", line 1, in <module>
File \"/private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/setup.py\", line 3, in <module>
import rtree
File \"/private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/rtree/__init__.py\", line 1, in <module>
from .index import Rtree
File \"/private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/rtree/index.py\", line 6, in <module>
from . import core
File \"/private/var/folders/1g/t90pxf4x4rzdypyz5jybl9yw0000gn/T/pip-install-imj0pc0j/rtree_77886c1cf36d47a8aa2bef7aa1b5267f/rtree/core.py\", line 143, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File \"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py\", line 377, in __getattr__
func = self.__getitem__(name)
File \"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py\", line 382, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/56/6f/f1e91001d5ad9fa9bed65875152f5a1c7955c5763168cae309546e6e9fda/Rtree-0.9.4.tar.gz#sha256=cae327e2c03b3da4ea40d0fdf68f3e55fe9f302c56b9f31e1bfeb36dbea73f44 (from https://pypi.org/simple/rtree/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement rtree==0.9.4 (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7)
ERROR: No matching distribution found for rtree==0.9.4
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the \'/Users/paulonascimento/Desktop/nooo/pychop3d-master/venv/bin/python -m pip install --upgrade pip\' command.
这方面的大多数主题都与安装 libspatialindex 有关。我已经使用 Homebrew 安装了 spatialindex,但我仍然无法安装 rtree==0.9.4。我应该降级我的 Python 版本还是类似的东西?我还按照“警告”中的建议更新了我的 pip 版本,但错误仍然存在。
标签: python macos-monterey r-tree