No module named 'fbprophet'?

Question:

I have tried to install Facebook Prophet in Anaconda on Ubuntu following the instructions at:

https://facebook.github.io/prophet/docs/installation.html#installation-in-python.

In Anaconda Navigator, when I click on the environment, fbprophet is listed along with the other installed packages. The problem is that when I try to use fbprophet in Jupyter:

from fbprophet import Prophet

I get an error: “ModuleNotFoundError: No module named ‘fbprophet'”. It’s bizarre because the fbprophet package seems to be installed in my environment according to Anaconda.

Can anyone help, please?

Thanks!

Answers:

It seems that you have installed the package in a separate environment in anaconda. I think when you are running jupyter notebook, it is running from the base environment, But actually you need to run it from the library environment. So if the case is this you need to install jupyter notebook in the other environment and then run the jypyter notebook from that environment. So at first make sure that you have installed jupyter notebook correctly on the appropriate environment. If you have installed it correctly then open jupyter notebook and in a code cell write the following commands and execute the cell.

First, execute this command in a code cell-

!conda install -c conda-forge fbprophet -y

Then in another code cell execute this command-

!pip install --upgrade plotly

Now try to import the library.

Answered By: Tanmoy Datta

Recently the fbprophet project renamed to prophet.
If you are referring to it using old name you should install the old version.

pip/conda/mamba/whatever install prophet

After spending hours scouring the internet for answers to this question and similar questions like "ERROR: Command errored out with exit status 1: when installing "Facebook" "prophet"" what worked for me was quite simply using a sudo pip install at the terminal prompt:

$ sudo pip install pystan==2.19.1.1 prophet

After install using prophet instead of fbprophet:

from prophet import Prophet

Credit to GitHub issue 1874 – https://github.com/facebook/prophet/issues/1874

Answered By: iraseidman

Window10 + Pycharm.
This works with Python 3.8. and Python 3.9.x:

pip install localpip 
localpip install fbprophet
Answered By: kiki

For people coming from a Jupyter Notebook, use:

!pip install prophet

as officially suggested in https://facebook.github.io/prophet/docs/installation.html.

It’s also stated that:

As of v1.0, the package name on PyPI is “prophet”; prior to v1.0 it was “fbprophet”.

Answered By: gsamaras