因此,我试图从OpenAI安装3.11.2,并且说我有版本的D0,所以它不能安装只需要>=3.7,<3.11版本的D1版本,但我发誓,当我检查我的D1版本时,它说我有我需要的版本,如下所示:
$ python --version
Python 3.10.8顺便说一句,在我有3.11.2版本之前,我用这个职位的帮助对它进行了修改,也许执行这个帖子中的命令没有帮助。我是个彻头彻尾的乞丐,所以也许有一个简单的解决办法,我不知道。另外,我使用的是kali linux。下面是我的错误:
pip install git+https://github.com/openai/whisper.git
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/openai/whisper.git
Cloning https://github.com/openai/whisper.git to /tmp/pip-req-build-n6ajw2le
Running command git clone --filter=blob:none --quiet https://github.com/openai/whisper.git /tmp/pip-req-build-n6ajw2le
Resolved https://github.com/openai/whisper.git to commit ad3250a846fe7553a25064a2dc593e492dadf040
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting triton==2.0.0
Using cached triton-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (63.3 MB)
Collecting numba
Using cached numba-0.56.4.tar.gz (2.4 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.py", line 51, in
_guard_py_ver()
File "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.py", line 48, in _guard_py_ver
raise RuntimeError(msg.format(cur_py, min_py, max_py))
RuntimeError: Cannot install on Python version 3.11.2; only versions >=3.7,<3.11 are supported.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.发布于 2023-03-09 01:49:04
update-alternatives的问题是其他版本还在安装,您正在使用的程序不一定要使用您希望它们使用的版本。尝试用apt purge删除不需要的包。
此外,查看~/.local/bin和~/.local/lib,以删除pip遗留下来的与Python相关的垃圾。如果您没有在这些文件夹中安装其他任何内容,它们应该是安全的删除。警告:~/.local/share确实包含您希望保留的文件。如果你想把它清理干净,你必须手动检查它。
pip在~/.cache/pip中缓存下载,这样您就可以重新安装包,而不必重新下载其中的大多数。
https://unix.stackexchange.com/questions/739127
复制相似问题