Registry / ai-ml / prophet

prophet

JSON →
library1.4.0pypypi✓ verified 27d ago

Prophet is an automatic forecasting procedure developed by Facebook. It is designed for analyzing time series that exhibit strong seasonal effects and has several seasons of historical data. The current version is 1.3.0, and it maintains a regular release cadence with frequent updates and bug fixes.

pip install prophet
INSTALL
IMPORT
SIG · PROPHET
P
prophet
ai-mlpythonv1.4.0
Install
12.7s avg
Import
3954ms
Disk
303MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 12.7s · import 3.954s · 293MB
303MB installed
● package 303MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Prophet
from prophet import Prophet
from fbprophet import Prophet
The library was renamed from 'fbprophet' to 'prophet'. Using 'fbprophet' will result in an ImportError as it is deprecated and no longer maintained.

This quickstart demonstrates how to create a simple Prophet model, fit it to a Pandas DataFrame, generate a future DataFrame, and make predictions. The input DataFrame must have columns named 'ds' (datetime) and 'y' (numerical value).

import pandas as pd from prophet import Prophet # Create a sample DataFrame with 'ds' (datetime) and 'y' (value) columns data = { 'ds': pd.to_datetime(['2017-01-01', '2017-01-02', '2017-01-03', '2017-01-04', '2017-01-05', '2017-01-06', '2017-01-07', '2017-01-08', '2017-01-09', '2017-01-10']), 'y': [10, 12, 15, 13, 17, 18, 20, 22, 25, 23] } df = pd.DataFrame(data) # Instantiate and fit the Prophet model model = Prophet() model.fit(df) # Create a future DataFrame for predictions (e.g., next 3 days) future = model.make_future_dataframe(periods=3) # Make predictions forecast = model.predict(future) # Print the last few rows of the forecast print(forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail())
prophet --version
Debug
Known issues
breakingThe official package name changed from `fbprophet` to `prophet`. Projects still using `fbprophet` will encounter import errors and miss out on updates.
fix
Update your import statements from `from fbprophet import Prophet` to `from prophet import Prophet`. If you were using `pip install fbprophet`, switch to `pip install prophet`.
affects: <=1.0.1 (for `fbprophet`) vs >=1.0.0 (for `prophet`)
gotchaInstallation of `prophet` often requires a C++ compiler and specific environment setup due to its `cmdstanpy` dependency. Users on Windows or macOS might need to install development tools (e.g., Build Tools for Visual Studio, Xcode Command Line Tools).
fix
Ensure a compatible C++ compiler is installed and accessible in your PATH. Refer to the `cmdstanpy` documentation for detailed installation instructions for your operating system (e.g., `https://mc-stan.org/cmdstanpy/installation.html`).
affects: All versions
gotchaProphet expects the 'ds' column to contain naive (timezone-unaware) datetime objects, ideally in UTC. Providing timezone-aware datetimes can lead to unexpected behavior or errors.
fix
Before passing your DataFrame to Prophet, ensure the 'ds' column is converted to timezone-naive datetimes. You can use `df['ds'] = df['ds'].dt.tz_localize(None)` to remove timezone information.
affects: All versions
gotchaProphet has strict dependencies on specific versions of `pandas` and `numpy`. Version conflicts can cause runtime errors or unexpected behavior. While recent versions (1.3.0) aim to broaden compatibility, it remains a common issue.
fix
Always install `prophet` in a clean virtual environment. If issues arise, try to `pip install "pandas<2"` or check the `prophet` documentation/changelog for explicitly supported `pandas` and `numpy` versions.
affects: All versions, historically more common in 0.x and 1.x before 1.3.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'prophet'
The `prophet` library is not installed in the active Python environment, or you are trying to import it using an outdated name (`fbprophet`).
fix
Ensure `prophet` is installed using `pip install prophet` or `conda install -c conda-forge prophet`, and import it with `from prophet import Prophet`.
ERROR: Failed building wheel for pystan
Prophet's dependency, PyStan, requires a C++ compiler during installation, which is often missing or incorrectly configured, especially on Windows.
fix
On Windows, install 'Microsoft C++ Build Tools' (from Visual Studio website). Alternatively, use `conda install -c conda-forge prophet` as conda often manages these dependencies more smoothly.
AttributeError: 'Prophet' object has no attribute 'stan_backend'
This error typically occurs due to a version incompatibility between `prophet` and its statistical backend dependencies like `pystan` or `cmdstanpy`.
fix
Try explicitly installing a compatible version of `pystan` (e.g., `pip install pystan==2.19.1.1`) before installing `prophet`, or ensure all related packages are updated or reinstalled together in a fresh environment.
ValueError: Dataframe has less than 2 non-NaN rows
The input DataFrame `df` provided to the `Prophet.fit()` method does not contain enough valid (non-NaN) data points in its 'ds' (datestamp) and 'y' (target variable) columns to perform a forecast.
fix
Ensure your DataFrame has at least two rows with valid, non-null values in both the 'ds' and 'y' columns, and that 'ds' is in a datetime format while 'y' is numeric.
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
This error often arises from an incompatibility with the `holidays` package, a dependency of Prophet, where a newer version of `holidays` might not be compatible with the installed `prophet` version.
fix
Uninstall the current `holidays` package and install a specific compatible version, such as `pip install holidays==0.24`.
Upgrade
Version history
1.4.0latest on PyPI · released Aug 15, 2026
Audit
Dependencies
cmdstanpyrequiredProphet relies on CmdStanPy for interfacing with Stan, which is the probabilistic programming language used for the underlying statistical model. Installation can sometimes be complex, requiring a C++ compiler.
pandasrequiredRequired for data manipulation, particularly for the input and output DataFrames (`ds`, `y`).
numpyrequiredCore numerical operations and data structures.
Agent activity
13 hits · last 30 days
node
10
Resources
prophet — pip install prophet · libregistry