Reputation: 452
I'm trying to use Facebook prophet for a project. The problem is that when I try to use it I have an error :
'Prophet' object has no attribute 'stan_backend'
when I initialize the prophet
from prophet import Prophet
m = Prophet()
I have installed prophet and pystan 1.19.1.1 using a pipenv. Here is my Pipfile
numpy = "~=1.20.2"
pystan = "~=2.19.1.1"
prophet = "~=1.0.1"
Any idea of what am I doing wrong? The strangest part is that when I make test on a jupyter notebook I don't get this problem (in that case I just used pip to install prophet)
By the way I'm on IntelliJ since I also use java in my project
Upvotes: 0
Views: 6068
Reputation: 51
I faced this issue on my windows machine while working with Prophet. Setting the environment variable pointing to 'CMDSTAN' directory fixed it.
import os
os.environ['CMDSTAN'] = "C:/Anaconda/Anaconda3/envs/test_conda_env/Library/bin/cmdstan"
from prophet import Prophet
m = Prophet()
For me cmdstan was installed in /Library/bin/cmdstan, within my conda environment.
Upvotes: 1
Reputation: 11
This method works for me :
Creating new environment and use conda install -c conda-forge prophet
in cmd
Upvotes: 1