Ошибка при использовании версии упаковки модуля kats не имеет атрибута legacyversion
Я пытаюсь использовать kats в первый раз, чтобы запустить код этой статьи.
Однако у меня была та же ошибка, что и в этом вопросе , и в этом вопросе, поэтому я попытался решить ее с помощью ответов на этот вопрос. (Я использовал Python 3.6, а теперь использую Python 3.9)
Однако теперь у меня другая ошибка, и еще сложнее гуглить. Теперь есть
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'
Кому-нибудь удалось запустить kats успешно? Как можно исправить эту ошибку?