gpt4 book ai didi

python - 无法正确导入聊天机器人及其语料库

转载 作者:行者123 更新时间:2023-11-28 21:36:54 26 4
gpt4 key购买 nike

我用过:

|
+ - lib
| |
| + - chatterbot
| |
| + - chatterbot_corpus
+ - main.py

我收到此错误:

Traceback (most recent call last):
File "main.py", line 1, in <module>
from lib.chatterbot.chatterbot import ChatBot
File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\__init__.py", line 4, in <module>
from .chatterbot import ChatBot
File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\chatterbot.py", line 3, in <module>
from .storage import StorageAdapter
File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\storage\__init__.py", line 2, in <module>
from .django_storage import DjangoStorageAdapter
File "D:\Workspace\PYTHON\phraser\lib\chatterbot\chatterbot\storage\django_storage.py", line 1, in <module>
from chatterbot.storage import StorageAdapter
ModuleNotFoundError: No module named 'chatterbot'

我该如何解决这个问题?

我不想在 python 中安装模块。

最佳答案

对于错误,No module named 'chatterbot'通过运行安装chatterbot

pip install chatterbot

更多信息请点击PyPi

对于错误,No module named 'chatterbot_corpus' 通过运行安装 chatterbot_corpus

pip install chatterbot-corpus

更多信息请点击PyPi

关于python - 无法正确导入聊天机器人及其语料库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50454716/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com