Search code examples
pythonfacebook-prophetanaconda3

No module named 'fbprophet'?


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!


Solution

  • 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.