PyFlux

raw JSON →
0.4.15 verified Fri May 01 auth: no python deprecated

PyFlux is a time-series analysis library for Python, offering a wide range of models including ARIMA, GARCH, and state space models. The current version is 0.4.15, but the library is no longer actively maintained and does not support Python 3.9+. It relies on older dependencies like NumPy and pandas.

pip install pyflux
error ModuleNotFoundError: No module named 'pyflux'
cause PyFlux is not installed or installed in a different environment.
fix
Run 'pip install pyflux' in the correct Python environment.
error AttributeError: module 'pyflux' has no attribute 'ARIMA'
cause Incorrect import path; ARIMA is in pyflux.arma.
fix
Use 'from pyflux.arma import ARIMA'.
error ImportError: cannot import name 'PyFlux' from 'pyflux'
cause The main class is PyFlux, not the module name.
fix
Use 'from pyflux import PyFlux' (note capital P).
deprecated PyFlux is no longer actively maintained. Consider migrating to statsmodels or pmdarima for time series analysis.
fix Use statsmodels.tsa.arima.model.ARIMA or pmdarima instead.
breaking PyFlux does not support Python 3.9 or later. Installation may fail on modern Python versions.
fix Use Python 3.8 or earlier, or switch to a maintained library.
gotcha Import model classes from submodules like pyflux.arma, not directly from pyflux.
fix Use 'from pyflux.arma import ARIMA' instead of 'from pyflux import ARIMA'.

Basic ARIMA model fit and forecast.

import pandas as pd
import numpy as np
from pyflux.arma import ARIMA

# Create sample data
dates = pd.date_range('2021-01-01', periods=100, freq='D')
data = pd.Series(np.random.randn(100), index=dates)

# Fit ARIMA model
model = ARIMA(data=data, ar=1, ma=1, integ=1)
model.fit()

# Forecast
forecast = model.predict(h=5)
print(forecast)