简体   繁体   中英

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'

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

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

I found an answer her:

Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) by Sushant Chaudhary

Thank you!!

Try installing fbprophet

pip install fbprophet

Or

pip3 install fbprophet

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

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

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

This worked for me. pip3 was a must!

pip3 install pystan 
pip3 install fbprophet

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM