Darts is a Python library for user-friendly forecasting and anomaly detection on time series. It offers a unified API for a wide range of models, from classical statistical methods like ARIMA to advanced deep learning architectures such as LSTM and Transformers. The library also includes tools for model evaluation, backtesting, handling multiple time series, and incorporating external covariates. It is actively maintained with frequent minor releases, typically on a monthly basis. [1, 2, 4, 9, 11, 13, 16, 22]
pip install dartsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a `TimeSeries` object from a Pandas DataFrame, split it into training and validation sets, fit an `ExponentialSmoothing` model, and generate a forecast. The example then plots the actual series against the predicted values. [4, 8, 11, 12, 13]
Upgrade your Python environment to 3.10 or higher.
Use `pip install darts` for installation and `from darts import ...` for imports. Do not use `u8darts`.
Ensure your input `TimeSeries` objects (targets and covariates) are free of NaNs. This often involves properly handling missing dates and ensuring the `freq` argument is correctly set when creating a `TimeSeries` from a DataFrame. [20]
Consider using a Conda environment for easier dependency management (`conda install -c conda-forge -c pytorch u8darts-all`) or install specific optional dependencies separately after the core Darts package, following their respective installation guides. [1, 3]