在做项目时在参考别人的代码时,其from fbgrophet import Proghet给我造成了很大的困扰。我先是用conda装了能在里面找到的prophet,可以看到我在里面安装了prophet(p是小写的):
但这个并不能用import prophet来替代他的那句from fbgrophet import Proghet,两者还是不一样的。
然后我又翻了很多其他人的csdn攻略,安装了pystan、plotly(不知道这一步是不是后面成功的原因之一,先写着)。
然后在按照网上攻略conda install -c conda-forge install fbprophet,安装fbprophet。报错:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed
最后我试了下:
将别人的代码from fbgrophet import Proghet改成了from prophet import Prophet,成功!
其实我也不知道是不是前面的安装是必须的,但最后这个改完后确实成功了。