Anacondaでfbprophetがインストールできなかった対処
# 状況
Anaconda環境でfbprophetがインストールできない
Specifications: - fbprophet -> python[version=........ Your python: python=3.9 If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.
インストールしようとしたライブラリが、AnacondaのあなたのPythonバージョンでは対応してません。ダウングレードしたバージョンでやってください的なことが言われました
# 対応
Anacondaの `(base)` と別に、ダウングレードしたPythonを入れた仮想環境をつくり、そこにfbprophetをインストールして作業環境を作ることにしました(趣味の勉強でやってるだけなので、使えれば何でも良い為)
- 自分のAnacondaの`(base)`は、Python3.9です
- 別途、`Python_3_7`という環境をつくり、Python3.7を入れました
作り方はこちらを参考にしました
最新版Anaconda(21年5月27日現在)にPython3.7の環境を作り,Prophetをインストールする~Windows版~ - IT入門書籍 スッキリシリーズ
作成した環境`Python_3_7`のターミナルを開きます
開いたターミナルの左側が、作成した環境名になってるかと思います
(Python_3_7) user@xxxx ~ %
必要なライブラリをインストールしていきます
conda install numpy matplotlib pandas scikit-learn
conda install -c conda-forge fbprophet
# その他
- pystanが先にインストールされていると干渉して、上手くいかないこともあるらしい
- いったんpystanはアンインストールし、fbprophetをインストールする
- python3 で fbprophet のインストールエラーについて