
それで、OpenAIでWhisperをインストールしようとしていますが、バージョンがあるのでインストール3.11.2
できないと思います。ただWhisperのバージョンが必要です>=3.7,<3.11
が、Pythonのバージョンを確認すると、次のように必要なバージョンがあることがわかります。
$ python --version
Python 3.10.8
さて、バージョンがある前は、3.11.2
次の助けを借りてバージョンを変更しました。この投稿
たぶん、この投稿のコマンドを実行しても役に立ちません。私は完全初心者なので、私が知らない簡単な解決策があるかもしれません。私もCaliLinuxを使用しています。
私が経験したエラーは次のとおりです。
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
。
また、残されたPython関連のジャンクを確認し~/.local/bin
て~/.local/lib
削除してください。pip
このフォルダに他のアイテムがインストールされていない場合は、削除しても安全です。警告:~/.local/share
アーカイブしたいファイルが含まれています。清掃が必要な場合は、手動で清掃する必要があります。
pip
キャッシュのダウンロードにより、~/.cache/pip
ほとんどのパッケージを再ダウンロードすることなくパッケージを再インストールできます。