docs/_docs/installation.md
Prophet has two implementations: R and Python.
<a href="#r"></a>
Prophet is a CRAN package so you can use install.packages.
# R
install.packages('prophet')
After installation, you can get started!
You can also choose an experimental alternative stan backend called cmdstanr. Once you've installed prophet,
follow these instructions to use cmdstanr instead of rstan as the backend:
# R
# We recommend running this is a fresh R session or restarting your current session
install.packages(c("cmdstanr", "posterior"), repos = c("https://stan-dev.r-universe.dev", getOption("repos")))
# If you haven't installed cmdstan before, run:
cmdstanr::install_cmdstan()
# Otherwise, you can point cmdstanr to your cmdstan path:
cmdstanr::set_cmdstan_path(path = <your existing cmdstan>)
# Set the R_STAN_BACKEND environment variable
Sys.setenv(R_STAN_BACKEND = "CMDSTANR")
On Windows, R requires a compiler so you'll need to follow the instructions provided by rstan. The key step is installing Rtools before attempting to install the package.
If you have custom Stan compiler settings, install from source rather than the CRAN binary.
<a href="#python"></a>
Prophet is on PyPI, so you can use pip to install it.
python -m pip install prophet
After installation, you can get started!
Prophet can also be installed through conda-forge.
conda install -c conda-forge prophet