所以我试图从 OpenAI 安装 耳语 并说我有版本,3.11.2
所以它无法安装只需要版本的耳语>=3.7,<3.11
但我发誓,当我检查我的 python 版本时,它说我有我需要的版本,如下所示:
$ 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 "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-bvqf8ryy/numba_26a7eac980d84443948e159a452af5d2/setup.py", line 51, in <module>
_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.
答案1
问题update-alternatives
是仍然安装了其他版本,并且您正在使用的程序不一定必须使用您想要的版本。尝试使用 删除不需要的包apt purge
。
另外,查看~/.local/bin
并~/.local/lib
删除pip
留下的与 Python 相关的垃圾。如果您没有在这些文件夹中安装任何其他内容,则应该可以安全地删除它们。警告:~/.local/share
确实包含您想要保留的文件。如果您想清理它,则必须手动进行。
pip
将下载缓存在 中~/.cache/pip
,因此您可以重新安装软件包,而无需重新下载其中的大部分软件包。