0

当我尝试在 python 版本 3.8 中安装 Rasa3 时,我遇到了以下问题

Traceback (most recent call last):
  File "/home/mayurpardeshi/test/bin/rasa", line 5, in <module>
    from rasa.__main__ import main
  File "/home/mayurpardeshi/test/lib/python3.8/site-packages/rasa/__main__.py", line 14, in <module>
    from rasa.cli import (
  File "/home/mayurpardeshi/test/lib/python3.8/site-packages/rasa/cli/export.py", line 9, in <module>
    import rasa.core.utils
  File "/home/mayurpardeshi/test/lib/python3.8/site-packages/rasa/core/utils.py", line 25, in <module>
    from sanic.views import CompositionView
ImportError: cannot import name 'CompositionView' from 'sanic.views' (/home/mayurpardeshi/test/lib/python3.8/site-packages/sanic/views.py)

有人解决了这个问题吗?

4

1 回答 1

0

这是由最近的 Sanic 升级引起的问题。在这个 GitHub issue中有更详细的描述。

短期的解决方案是手动安装旧版本的 Sanic。这应该足够了:

pip install sanic==21.9.3
于 2021-12-28T15:08:34.277 回答