I am trying to use kats for the first time in order to run the code of this article
However I had the same error as in this question and in this question so I tried to solve it with the answers on those question. (I was using Python 3.6 and now I am using python 3.9)
However now I have a different error, and even harder to google. Now it is
from kats.detectors.outlier import OutlierDetector
outlier_detector = OutlierDetector(ts_day, "additive")
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[19], line 1
----> 1 from kats.detectors.outlier import OutlierDetector
3 outlier_detector = OutlierDetector(ts_day, "additive")
File ~/miniconda3/envs/data_analysisPy39/lib/python3.9/site-packages/kats/__init__.py:6
1 # Copyright (c) Meta Platforms, Inc. and affiliates.
2 #
3 # This source code is licensed under the MIT license found in the
4 # LICENSE file in the root directory of this source tree.
----> 6 from . import compat # noqa # usort: skip
7 from . import consts # noqa # usort: skip
8 from . import data # noqa # usort: skip
File ~/miniconda3/envs/data_analysisPy39/lib/python3.9/site-packages/kats/compat/__init__.py:6
1 # Copyright (c) Meta Platforms, Inc. and affiliates.
2 #
3 # This source code is licensed under the MIT license found in the
4 # LICENSE file in the root directory of this source tree.
----> 6 from . import compat # noqa # usort: skip
7 from . import pandas # noqa # usort: skip
8 from . import statsmodels # noqa # usort: skip
File ~/miniconda3/envs/data_analysisPy39/lib/python3.9/site-packages/kats/compat/compat.py:19
14 from typing import Callable, Union
16 from packaging import version as pv
---> 19 V = Union[str, "Version", pv.Version, pv.LegacyVersion]
22 class Version:
23 """Extend packaging Version to allow comparing to version strings.
24
25 Wraps instead of extends, because pv.parse can return either a
26 pv.Version or a pv.LegacyVersion.
27 """
AttributeError: module 'packaging.version' has no attribute 'LegacyVersion'
Has anyone been able to run kats successfully? How can this error be corrected?