実現したいこと
仮想環境でエラーなくpip install~ をできるようにしたい。
発生している問題・分からないこと
仮想環境でpip install (numpy,pandas,seaborn...)をすると必ずRun-time dependency scipy-openblas found:NO (tried pkgconfig)のエラーが出ます。
sudo apt install openblasは最新バージョンです。
pipもupgradeしています。
エラーメッセージ
error
1Collecting numpy 2 Using cached numpy-2.2.1.tar.gz (20.2 MB) 3 Installing build dependencies ... done 4 Getting requirements to build wheel ... done 5 Installing backend dependencies ... done 6 Preparing metadata (pyproject.toml) ... error 7 error: subprocess-exited-with-error 8 9 × Preparing metadata (pyproject.toml) did not run successfully. 10 │ exit code: 1 11 ╰─> [52 lines of output] 12 13Library m found: YES 14Run-time dependency scipy-openblas found: NO (tried pkgconfig) 15Run-time dependency openblas found: YES 0.3.13 16Message: BLAS symbol suffix: 17Run-time dependency openblas found: YES 0.3.13 18Checking if "Check atomic builtins without -latomic" : links: YES 19 20Configuring __config__.py using configuration 21 22 ../numpy/_core/meson.build:145:31: ERROR: Can not run test applications in this cross environment. 23 24 A full log can be found at /tmp/pip-install-gweefajk/numpy_731b1bcc2fc645c7b3702ffbeea1d11b/.mesonpy-ktpzzj_r/meson-logs/meson-log.txt 25 [end of output] 26 27 note: This error originates from a subprocess, and is likely not a problem with pip. 28error: metadata-generation-failed 29 30× Encountered error while generating package metadata. 31╰─> See above for output. 32 33note: This is an issue with the package mentioned above, not pip. 34hint: See above for details.
該当のソースコード
Python
1有効中の仮想環境 : pip install numpy
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
sudo apt install openblasもやったがなにもならずです。
補足
python3.13.1を公式からダウンロードし、解凍、altinstallをしたうえでpython3.13の仮想環境をさくせいしています。
OS(ディストリビューション)とCPUアーキテクチャの情報を質問に載せた方がよいと思います(質問を編集しましょう)
あとメッセージに書いてあるとおり、ログを読みましょう/載せましょう
> python3.13の仮想環境で
仮想環境はどの方法で作成されましたか?
cdで移動して
python3.13 -m venv {フォルダ名}
で作成しました。
> A full log can be found at /tmp/pip-install-gweefajk/numpy_731b1bcc2fc645c7b3702ffbeea1d11b/.mesonpy-ktpzzj_r/meson-logs/meson-log.txt
上記ログファイルには何か他に書かれていませんでしたか?
上記ログファイルをテキストエディタで開いたら、まっさらで何も書かれていませんでした。
OS は Raspbian 32bit ……?
scipy-openblasがNOになっているのなら、これをインストールすればいいのかなと…単純に思ったんですが既に試されてぃすかね?
> ../numpy/_core/meson.build:145:31: ERROR: Can not run test applications in this cross environment.
同様のエラーが Meson の GitHub リポジトリで報告されています。
"Can not run test applications in this cross environment" not consistent with meson.can_run_host_binaries() · Issue #13841 · mesonbuild/meson
https://github.com/mesonbuild/meson/issues/13841
問題は解決済みで、master branch にマージされています。(2024/11/29時点)
environment: Never require an exe_wrapper for native builds by smcv · Pull Request #13930 · mesonbuild/meson
https://github.com/mesonbuild/meson/pull/13930/commits/057aad14ce153b9b71c5812e41b6306bc76361f9
解決しました。
結論は、ラズパイのOSが32bitだったのが問題だったようです。
最近Pythonに触れ始めたので32bitに対応していないこと自体を知りませんでした。
質問してくださった皆さん、ありがとうございました。
最初から書いてあれば秒で解決したでしょうに……
回答2件
あなたの回答
tips
プレビュー