質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
NumPy

NumPyはPythonのプログラミング言語の科学的と数学的なコンピューティングに関する拡張モジュールです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

0回答

5359閲覧

「pip install physbo」のエラー

PHYSBO

総合スコア17

NumPy

NumPyはPythonのプログラミング言語の科学的と数学的なコンピューティングに関する拡張モジュールです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2022/01/31 12:46

編集2022/02/01 00:11

前提・実現したいこと

Python初心者です。
今通常の(conda環境ではない)Windows PowerShellでpip install physboを試みたところ、
以下のようなエラーが発生しました。この解決法が分かりません。

physboインストール実行環境・必要なパッケージ

PHYSBOの実行環境・必要なパッケージは以下の通りです。

  • Python >= 3.6
  • numpy
  • scipy

発生している問題・エラーメッセージ

PS C:\Users\~~~~> pip3 install physbo Collecting physbo Using cached physbo-1.0.1.tar.gz (38 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: scipy in c:\users\~~~~\appdata\roaming\python\python38\site-packages (from physbo) (1.7.3) Requirement already satisfied: numpy in c:\users\~~~~\appdata\local\programs\python\python38\lib\site-packages (from physbo) (1.21.2) Building wheels for collected packages: physbo Building wheel for physbo (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for physbo (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] running bdist_wheel running build running build_py running build_ext cythoning physbo/misc/_src/traceAB.pyx to physbo/misc/_src\traceAB.c cythoning physbo/misc/_src/cholupdate.pyx to physbo/misc/_src\cholupdate.c cythoning physbo/misc/_src/diagAB.pyx to physbo/misc/_src\diagAB.c cythoning physbo/gp/cov/_src/enhance_gauss.pyx to physbo/gp/cov/_src\enhance_gauss.c cythoning physbo/misc/_src/logsumexp.pyx to physbo/misc/_src\logsumexp.c building 'physbo.misc._src.traceAB' extension C:\Users\~~~~\AppData\Local\Temp\pip-build-env-l_b9s_0l\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\~~~~\AppData\Local\Temp\pip-install-wsci3lkz\physbo_d4fe4b21d8394690818e5c7a9be8c2ea\physbo\misc\_src\traceAB.pyx tree = Parsing.p_module(s, pxd, full_module_name) C:\Users\~~~~\AppData\Local\Temp\pip-build-env-l_b9s_0l\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\~~~~\AppData\Local\Temp\pip-install-wsci3lkz\physbo_d4fe4b21d8394690818e5c7a9be8c2ea\physbo\misc\_src\cholupdate.pyx tree = Parsing.p_module(s, pxd, full_module_name) C:\Users\~~~~\AppData\Local\Temp\pip-build-env-l_b9s_0l\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\~~~~\AppData\Local\Temp\pip-install-wsci3lkz\physbo_d4fe4b21d8394690818e5c7a9be8c2ea\physbo\misc\_src\diagAB.pyx tree = Parsing.p_module(s, pxd, full_module_name) C:\Users\~~~~\AppData\Local\Temp\pip-build-env-l_b9s_0l\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\~~~~\AppData\Local\Temp\pip-install-wsci3lkz\physbo_d4fe4b21d8394690818e5c7a9be8c2ea\physbo\gp\cov\_src\enhance_gauss.pyx tree = Parsing.p_module(s, pxd, full_module_name) C:\Users\~~~~\AppData\Local\Temp\pip-build-env-l_b9s_0l\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\~~~~\AppData\Local\Temp\pip-install-wsci3lkz\physbo_d4fe4b21d8394690818e5c7a9be8c2ea\physbo\misc\_src\logsumexp.pyx tree = Parsing.p_module(s, pxd, full_module_name) error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for physbo Failed to build physbo ERROR: Could not build wheels for physbo, which is required to install pyproject.toml-based projects

試したこと

エラー文後半の
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
「Microsoft Visual C++ 14.0 or greater is required.」が出た場合の対処方法
に従い、対処しましたが、その後再度pip install physboを実行しても上記と同じエラー文が表示されました。
なのでほかの所に問題があるのかと考えていますが、アドバイスを頂ければ幸いです。

補足情報(ツールのバージョンなど)

  • Windows10
  • Python 3.8.0
  • pip 22.0.2

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ppaul

2022/01/31 13:21

cl.exeのパスを環境変数に追加したあと、新しいPowerShellを起動して、そこからpip3 install physboを実行しましたか?
PHYSBO

2022/01/31 13:49

はい。システム変数にパスを追加後、再起動し、pip3 install physboを実行しました。 以下はパスが通ったことの確認です。 ```PS C:\Users\~~~~> cl Microsoft(R) C/C++ Optimizing Compiler Version 19.29.30139 for x86 Copyright (C) Microsoft Corporation. All rights reserved. 使い方: cl [ オプション... ] ファイル名... [ /link リンク オプション... ] ```
ppaul

2022/01/31 14:41

試しにインストールしてみたところ、特にエラーとかを出さずにインストールできてしまいました。 C++は使っていません。 >python -V Python 3.7.11 pip install physbo Collecting physbo Downloading physbo-1.0.1.tar.gz (38 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting numpy Using cached numpy-1.21.5-cp37-cp37m-win_amd64.whl (14.0 MB) Collecting scipy Downloading scipy-1.7.3-cp37-cp37m-win_amd64.whl (34.1 MB) ---------------------------------------- 34.1/34.1 MB 40.9 MB/s eta 0:00:00 Building wheels for collected packages: physbo Building wheel for physbo (pyproject.toml) ... done Created wheel for physbo: filename=physbo-1.0.1-cp37-cp37m-win_amd64.whl size=141314 sha256=17288458a99ed30e6a687abf439f237ee51926cfd0d42c3a89fe7c5198170552 Stored in directory: c:\users\shinp\appdata\local\pip\cache\wheels\e3\1c\09\6a40470c5f2705129a491a6e91b7514152b580313ff9698cb8 Successfully built physbo Installing collected packages: numpy, scipy, physbo Successfully installed numpy-1.21.5 physbo-1.0.1 scipy-1.7.3 エラーが再現しないので、これ以上はわかりません。 一度、Pythonから再インストールしてやり直してみるぐらいしか方法を思いつけませんね。
PHYSBO

2022/01/31 15:11 編集

ありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問