Search code examples
pythonimportjupyter-notebookfacebook-prophet

I can't import prophet from fbprophet


I think this is simple question but I can't find solution

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from fbprophet import prophet
from sklearn.metrics import mean_squre_error,mean_absolute_error
plt.style.use('ggplot')

this is my code when I execute this I got error

enter image description here

ImportError                               Traceback (most recent call last)
 <ipython-input-1-cca636903a85> in <module>
  3 import matplotlib.pyplot as plt
  4 import seaborn as sns
  ----> 5 from fbprophet import prophet
  6 from sklearn.metrics import mean_squre_error,mean_absolute_error
  7 plt.style.use('ggplot')
  **ImportError: cannot import name 'prophet' from 'fbprophet' (C:\Users\senth\anaconda3\lib\site-packages\fbprophet\__init__.py)**

can anyone help me to solve the error..!!


Solution

  • You have imported the model with the wrong capilization. The correct import, according to the docs is:

    from fbprophet import Prophet