Toly
Toly

Reputation: 3169

Prophet / fbprophet package in Python

Can someone explain how to install Prophet on Python3?

I tried pip install fbprophet but it did not work.

Tried to do this in the notebook after importing pandas and sklearn and got another error:

import pandas as pd
import sklearn as sk
from fbprophet import Prophet
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-4-f503e9c6cf11> in <module>()
----> 1 from fbprophet import Prophet

ModuleNotFoundError: No module named 'fbprophet'

Upvotes: 8

Views: 68912

Answers (10)

ORSpecialist
ORSpecialist

Reputation: 401

Pip install can be done since Prophet is on PyPI;

python -m pip install prophet

It can also be installed through conda-forge;

conda install -c conda-forge prophet

Upvotes: 0

Masoud Nazari
Masoud Nazari

Reputation: 496

according to it's document, new version was renamed to prophet and can be installed with:

python -m pip install prophet

or

conda install -c conda-forge prophet

Upvotes: 0

Samson Inakoju
Samson Inakoju

Reputation: 31

I had this problem and I have been trying to solve it for two days now I found out that fbprophet is no longer being maintained and that's why pip install fbprophet does not work.

do pip install prophet instead

if you want to import after installation: from prophet import Prophet

Upvotes: 3

Mohamad Ghaith Alzin
Mohamad Ghaith Alzin

Reputation: 959

This worked for me. pip3 was a must!

pip3 install pystan 
pip3 install fbprophet

Upvotes: 0

amanullah khan
amanullah khan

Reputation: 1

!pip install pystan==2.19.1.1 fbprophet ##### i was trying to install fbprophet==0.7.1 but in the presence of cmdstanpy==0.9.5 it was unable to build the wheel for fbprophet. after executing the above command for installing pystan==2.19.1.1 collectively with fbprophet successfully installed cmdstanpy-0.9.5 fbprophet-0.7.1 note that there is no version specified for fbprophet in the command and pystan is specified with version 2.19.1.1 to avoid dependency conflicts.

Upvotes: 0

Natnael Sisay Kagnaw
Natnael Sisay Kagnaw

Reputation: 31

I had relatively similar problem, but my error was it couldn't import pystan which in installed using pip install pystan. so the problem was fbprophet doesn't support latest version of pystan so uninstall previous one and install older version of pystan.

pip install pystan==2.19.1.1 pip install fbprophet

https://facebook.github.io/prophet/docs/installation.html

Upvotes: 3

Pablohoney
Pablohoney

Reputation: 104

On Windows it's easier using anaconda or miniconda, just give

conda install pystan

and it will install all the needed dependencies, included the c++ compiler, then

pip install fbprophet

in Linux systems, for example, ubuntu, a simple

pip install pystan
pip install fbprophet 

should work, without installing anaconda/miniconda

Upvotes: 2

Al Jaber Nishad
Al Jaber Nishad

Reputation: 131

Easiest way is to install fbprophet :

conda install -c conda-forge fbprophet

This will download all the needed packages first.

Then ->

  conda install -c conda-forge/label/cf201901 fbprophet

Upvotes: 7

Brijesh Rana
Brijesh Rana

Reputation: 651

First you have to Install c++ compiler, you can install c++ compiler with below command -

conda install libpython m2w64-toolchain -c msys2

Once c++ compiler installed you have to install pystan, to install pystan you can use below command

pip install pystan

Finally, now we are ready to install facebook prophet -

pip install fbprophet

Hope this is helpful..

For more details follow this link - https://facebook.github.io/prophet/docs/installation.html

Upvotes: 9

Computer&#39;s Guy
Computer&#39;s Guy

Reputation: 5353

Try installing fbprophet

pip install fbprophet

Or

pip3 install fbprophet

Upvotes: 3

Related Questions