使用 Prophet 时,“StanModel”对象没有属性“fit_class”

Dex*_*ter 6 python prophet pystan

我正在尝试使用先知。我已经安装了所有必需的软件包:

pip install pandas numpy jupyterlab seaborn 
conda install pywin32 
conda install -c anaconda pystan=2.19.1.1=py38hac22706_0
conda install -c conda-forge prophet 
conda install -c conda-forge tensorflow 
pip install darts 
conda install -c conda-forge prophet
Run Code Online (Sandbox Code Playgroud)

为什么pystan=2.19.1.1=py38hac22706_0?因为有人有这个版本并且一切正常,所以他建议这个版本。相同的Windows系统,安装包的顺序相同。'StanModel' object has no attribute 'fit_class'但我在拟合模型时遇到错误:

model = Prophet()
model.fit(train)
prediction = model.predict(len(val))
Run Code Online (Sandbox Code Playgroud)

我检查了一下我是否真的有Pystan,我真的有。

请帮忙。

小智 3

卸载 fbprophet 和 pystan,然后:

pip install pystan==2.19.1.1
pip install prophet
Run Code Online (Sandbox Code Playgroud)

from prophet import Prophet
Run Code Online (Sandbox Code Playgroud)