Install & Compatibility
Where this runs
tested against v2.1.1 · 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
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 18.6s · import 5.236s · 426MB
441MB installed
● package 441MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
auto_arima
✓ from pmdarima import auto_arima
ARIMA
✓ from pmdarima.arima import ARIMA
✗ from pmdarima import ARIMA
ARIMA is located in the `pmdarima.arima` submodule, not directly under `pmdarima`.
This quickstart demonstrates how to use `pmdarima.auto_arima` to automatically select and fit an ARIMA model to a time series and generate future predictions. The example uses a simple synthetic dataset, fits the model, and then forecasts 10 future periods. Parameters like `start_p`, `start_q`, `max_p`, `max_q`, and `seasonal` control the search space for the optimal ARIMA model.
import pmdarima as pm
import numpy as np
import matplotlib.pyplot as plt
# Generate some sample time series data
y = np.random.rand(100) * 10 + np.arange(100) # Simple trend + noise
# Fit a stepwise auto_arima model
model = pm.auto_arima(y,
start_p=1, start_q=1,
test='adf', # use adftest to find optimal 'd'
max_p=3, max_q=3, # maximum p and q
m=1, # frequency of series
d=None, # let model determine 'd'
seasonal=False, # No seasonality
start_P=0,
D=0,
trace=False, # Suppress verbose output
error_action='ignore',
suppress_warnings=True,
stepwise=True)
# Make predictions
forecast, conf_int = model.predict(n_periods=10, return_conf_int=True)
print("Forecast:", forecast)
print("Confidence Interval:", conf_int)
# Optional: plot results
# plt.plot(y, label='Actual')
# plt.plot(np.arange(len(y), len(y) + len(forecast)), forecast, label='Forecast')
# plt.fill_between(np.arange(len(y), len(y) + len(forecast)),
# conf_int[:, 0], conf_int[:, 1], alpha=0.1)
# plt.legend()
# plt.show()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pmdarima'
The `pmdarima` library is not installed in the Python environment currently being used, or the Python interpreter running the code is different from the one where `pmdarima` was installed.
fixEnsure `pmdarima` is installed in the correct environment using `pip install pmdarima` or `conda install -c conda-forge pmdarima`. If using an IDE or Jupyter, verify that the active kernel/interpreter matches the installation location.
ERROR: Failed building wheel for pmdarima
`pmdarima` uses Cython and requires C/C++ compilers (build tools) to be present on the system for successful installation if a pre-built wheel is not available for your specific Python version and operating system. Outdated `pip`, `setuptools`, or `wheel` can also contribute to this.
ValueError: Could not successfully fit ARIMA to input data. It is likely your data is non-stationary. Please induce stationarity or try a different range of model order params.
The `auto_arima` function often encounters difficulty converging or finding an optimal model if the input time series data is non-stationary (exhibits trends or seasonality that haven't been accounted for by differencing) or if the search space for ARIMA orders is too constrained or inappropriate for the data.
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
This error typically arises due to an incompatibility between the installed version of `pmdarima` (or its underlying dependencies) and `NumPy`, usually when a `NumPy` version change (e.g., from 1.x to 2.x) breaks binary compatibility, requiring dependent packages to be recompiled or updated.
Upgrade
Version history
2.1.1latest on PyPI · released Nov 17, 2025
Audit
Dependencies
pythonrequiredRequired runtime environment
numpyrequiredCore numerical operations; v2.1.0 dropped support for Numpy 1.x
scipyrequiredScientific computing; minimum version increased in v2.1.0
statsmodelsrequiredUnderlying statistical models; minimum version increased in v2.1.0
pandasrequiredData structures and analysis
scikit-learnrequiredScikit-learn compatible API and utilities
joblibrequiredParallelization for `n_jobs`
CythonrequiredUsed for performance-critical sections and building from source