実現したいこと
コマンドプロンプトで、pip install gradioをインストールしたい。
発生している問題・分からないこと
エラーが発生してしまい、インストールできない。
エラーメッセージ
error
1 Installing build dependencies ... done 2 Getting requirements to build wheel ... done 3 Installing backend dependencies ... done 4 Preparing metadata (pyproject.toml) ... error 5 error: subprocess-exited-with-error 6 7 × Preparing metadata (pyproject.toml) did not run successfully. 8 │ exit code: 1 9 ╰─> [21 lines 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.
該当のソースコード
Microsoft Windows [Version 10.0.26100.3775] (c) Microsoft Corporation. All rights reserved. C:\Users\kei70>pip install gradio Collecting gradio Downloading gradio-5.25.2-py3-none-any.whl.metadata (16 kB) Collecting aiofiles<25.0,>=22.0 (from gradio) Downloading aiofiles-24.1.0-py3-none-any.whl.metadata (10 kB) Collecting anyio<5.0,>=3.0 (from gradio) Downloading anyio-4.9.0-py3-none-any.whl.metadata (4.7 kB) Collecting audioop-lts<1.0 (from gradio) Downloading audioop_lts-0.2.1-cp313-abi3-win_amd64.whl.metadata (1.7 kB) Collecting fastapi<1.0,>=0.115.2 (from gradio) Downloading fastapi-0.115.12-py3-none-any.whl.metadata (27 kB) Collecting ffmpy (from gradio) Downloading ffmpy-0.5.0-py3-none-any.whl.metadata (3.0 kB) Collecting gradio-client==1.8.0 (from gradio) Downloading gradio_client-1.8.0-py3-none-any.whl.metadata (7.1 kB) Collecting groovy~=0.1 (from gradio) Downloading groovy-0.1.2-py3-none-any.whl.metadata (6.1 kB) Collecting httpx>=0.24.1 (from gradio) Downloading httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB) Collecting huggingface-hub>=0.28.1 (from gradio) Downloading huggingface_hub-0.30.2-py3-none-any.whl.metadata (13 kB) Collecting jinja2<4.0 (from gradio) Downloading jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB) Collecting markupsafe<4.0,>=2.0 (from gradio) Downloading markupsafe-3.0.2.tar.gz (20 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting numpy<3.0,>=1.0 (from gradio) Downloading numpy-2.2.5.tar.gz (20.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.3/20.3 MB 5.8 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] + C:\Users\kei70\AppData\Local\Programs\Python\Python314\python.exe C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a\vendored-meson\meson\meson.py setup C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a\.mesonpy-ok2rz78m -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a\.mesonpy-ok2rz78m\meson-python-native-file.ini The Meson build system Version: 1.5.2 Source dir: C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a Build dir: C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a\.mesonpy-ok2rz78m Build type: native build Project name: NumPy Project version: 2.2.5 WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']] The following exception(s) were encountered: Running `icl ""` gave "[WinError 2] 指定されたファイルが見つかりません。" Running `cl /?` gave "[WinError 2] 指定されたファイルが見つかりません。" Running `cc --version` gave "[WinError 2] 指定されたファイルが見つかりません。" Running `gcc --version` gave "[WinError 2] 指定されたファイルが見つかりません。" Running `clang --version` gave "[WinError 2] 指定されたファイルが見つかりません。" Running `clang-cl /?` gave "[WinError 2] 指定されたファイルが見つかりません。" Running `pgcc --version` gave "[WinError 2] 指定されたファイルが見つかりません。" A full log can be found at C:\Users\kei70\AppData\Local\Temp\pip-install-rowj8ufz\numpy_2abeffd3fdf4424fb4cf4239040bc01a\.mesonpy-ok2rz78m\meson-logs\meson-log.txt [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. C:\Users\kei70>
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
元々、pip install gradioを実行すると、'pip' は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。
といった内容のエラーがありましたが、これは、Pythonを消してから入れなおすことで解決しました。
そして、いざ実行してみると、このようなエラーが出てきました。
補足
素人ですが、宜しくお願いします。
C:\Users\kei70>python --version Python 3.14.0a7
Pythonのバージョンは新しめです。
ウィンドウズ11を使用。
numpyのインストールで失敗しているようですが、python 3.14 はかなり新しいので、どうしても3.14にこだたらないのであれば、pythonのバージョンを2つとか落してやってみてはどうでしょうか。
ドキュメントによると要件はPython 3.10以上のみのようですね。ですので他の方がおっしゃるようにPythonのバージョンが原因でしょう。「Pythonのバージョンは新しめです。」というより開発中(in development)です。
> python --version Python 3.14.0a7
Numpy の最新版は 2.2.5 で Python 3.10 から 3.13 までにしか対応していません。
Numpy v2.2.5 (Apr 19, 2025) Latest
https://github.com/numpy/numpy/releases/tag/v2.2.5
> NumPy 2.2.5 Release Notes
>
> This release supports Python versions 3.10-3.13.
以下の issue などを見るかぎり、Python 3.14 への対応は進んでいる様です。
BUG: temporary elision heuristics are broken on Python 3.14 · Issue #28681 · numpy/numpy
https://github.com/numpy/numpy/issues/28681
ENH: Support Python 3.14 by ngoldbaum · Pull Request #28748 · numpy/numpy
https://github.com/numpy/numpy/pull/28748
pcでこのサイトのこの場所にアクセス出来なくなり、コメント返せずにすいません。
皆さん、アドバイス有難う御座います。

回答2件
あなたの回答
tips
プレビュー