1. 程式人生 > >win10--fbprophet安裝方法與BUG解決方式

win10--fbprophet安裝方法與BUG解決方式

安裝參考
http://blog.sina.com.cn/s/blog_4b1452dd0102x97y.html
https://pystan.readthedocs.io/en/latest/windows.html
https://blog.csdn.net/csiao_Bing/article/details/85244640
https://blog.csdn.net/csiao_Bing/article/details/85244640

一、安裝環境
windows環境
Python 3.5或更高版本(推薦使用anaconda)
更新Microsoft .NET Framework到4.5.1以上版本(C++ 編譯器需要)
安裝C++編譯器Visual C++ Build Tools2015(在安裝 PyStan前需要安裝C++編譯器)
安裝 pystan庫(pip install pystan)
安裝fbprophet庫(conda install -c conda-forge fbprophet)

二、出現問題解決方法
1.C++編譯器沒裝,下載了下就好了
2.執行fit錯誤顯示 AttributeError: ‘StanModel’ object has no attribute 'fit_class’
搜尋了下反饋這些的問題 https://github.com/facebook/prophet/issues/249
在這裡插入圖片描述在這裡插入圖片描述
看大家討論大部分都是講的估摸應該是版本問題導致的,我自己是python3.7 fbpropeht 0.4 and pystan 2.18.0.0
在這裡插入圖片描述
試著下載fbprophet 0.3版本,回退版本:pip install --upgrade --force-reinstall --no-cache fbprophet==0.3.post2

我是下載fbprophet 0.3會報錯,所以用conda install -c conda-forge fbprophet重新安裝了,一開始因為下載源比較慢直接用的pip,事實證明容易有問題。