{"id":7128,"library":"darts","title":"Darts","description":"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]","status":"active","version":"0.43.0","language":"python","source_language":"en","source_url":"https://github.com/unit8co/darts","tags":["time-series","forecasting","machine-learning","deep-learning","anomaly-detection","pytorch"],"install":[{"cmd":"pip install darts","lang":"bash","label":"Basic Install"}],"dependencies":[{"reason":"Requires Python 3.10 or higher.","package":"python","optional":false},{"reason":"Required for neural network models (e.g., LSTM, TCN, N-BEATS). Install with `pip install \"darts[torch]\"`.","package":"torch","optional":true},{"reason":"Required for the Prophet model. Install with `pip install \"darts[notorch]\"` (includes other ML models too) or `pip install \"darts[all]\"`.","package":"prophet","optional":true},{"reason":"Required for AutoARIMA model. Included in `pip install \"darts[notorch]\"` or `pip install \"darts[all]\"`.","package":"pmdarima","optional":true},{"reason":"Underpins deep learning models. Minimum version >=2.0.0 for Darts >=0.41.0.","package":"pytorch-lightning","optional":false}],"imports":[{"symbol":"TimeSeries","correct":"from darts import TimeSeries"},{"note":"AutoARIMA is part of pmdarima integration, ARIMA is a separate Darts model.","wrong":"from darts.models import AutoARIMA","symbol":"ARIMA","correct":"from darts.models import ARIMA"},{"symbol":"ExponentialSmoothing","correct":"from darts.models import ExponentialSmoothing"}],"quickstart":{"code":"import pandas as pd\nfrom darts import TimeSeries\nfrom darts.models import ExponentialSmoothing\nimport matplotlib.pyplot as plt\n\n# Create a sample DataFrame (replace with your data)\ndf = pd.DataFrame({\n    'Month': pd.to_datetime(pd.date_range(start='2000-01-01', periods=120, freq='MS')),\n    '#Passengers': [100 + i + (i**1.2) * 0.5 for i in range(120)] # Example data\n})\n\n# Create a TimeSeries object\nseries = TimeSeries.from_dataframe(df, 'Month', '#Passengers')\n\n# Split data into training and validation sets\ntrain, val = series[:-12], series[-12:]\n\n# Initialize and fit a model\nmodel = ExponentialSmoothing()\nmodel.fit(train)\n\n# Make a prediction\nprediction = model.predict(len(val))\n\n# Plot the results\nseries.plot(label='actual')\nprediction.plot(label='forecast')\nplt.title('Darts Quickstart Forecast')\nplt.show()","lang":"python","description":"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]"},"warnings":[{"fix":"Upgrade your Python environment to 3.10 or higher.","message":"Darts version 0.41.0 and later removed support for Python 3.9. The new minimum Python version is 3.10. [9]","severity":"breaking","affected_versions":">=0.41.0"},{"fix":"Use `pip install darts` for installation and `from darts import ...` for imports. Do not use `u8darts`.","message":"As of Darts version 0.41.0, the PyPI package name changed from `u8darts` to `darts`. The `u8darts` package is no longer maintained. [1, 9]","severity":"breaking","affected_versions":">=0.41.0"},{"fix":"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]","message":"Training or forecasting with `TimeSeries` objects containing `NaN` values will often lead to `NaN`s in forecasts or errors. [20]","severity":"gotcha","affected_versions":"All"},{"fix":"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]","message":"Installing Darts with all optional dependencies (`pip install \"darts[all]\"` or `pip install \"darts[torch]\"`) can be complex due to non-Python dependencies for libraries like Prophet and PyTorch. [1, 3, 5, 17]","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'1':75 '11':79 '13':80 '16':81 '2':76 '22':82 '4':77 '9':78 'activ':64 'advanc':36 'also':47 'anomali':13,94 'anomaly-detect':93 'api':22 'architectur':39 'arima':34 'backtest':53 'basi':74 'classic':30 'covari':61 'dart':1,2 'deep':37,91 'deep-learn':90 'detect':14,95 'evalu':52 'extern':60 'forecast':11,86 'frequent':67 'friend':10 'handl':54 'includ':48 'incorpor':59 'learn':38,89,92 'librari':6,46 'like':33 'lstm':42 'machin':88 'machine-learn':87 'maintain':65 'method':32 'minor':68 'model':28,51 'month':73 'multipl':55 'offer':19 'python':5 'pytorch':96 'rang':26 'releas':69 'seri':17,57,85 'statist':31 'time':16,56,84 'time-seri':83 'tool':49 'transform':44 'typic':70 'unifi':21 'user':9 'user-friend':8 'wide':25","created_at":"2026-04-16T13:44:40.962420+00:00","updated_at":"2026-04-16T13:44:40.962420+00:00","problems":{"verify_error":"× Failed to build `numba==0.53.1`\n  ├─▶ The build backend returned an error\n  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit\n      status: 1)\n\n      [stderr]\n      Traceback (most recent call last):\n        File \"<string>\", line 14, in <module>\n        File\n      \"/home/xor/"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.44.1","cli_name":"","cli_version":null,"type":"library","homepage":"https://unit8co.github.io/darts/","github":"https://github.com/unit8co/darts","docs":"https://unit8co.github.io/darts/","changelog":null,"pypi":"https://pypi.org/project/darts/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"install_fail","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}