如何在google colab中安装chatterbot

问题描述 投票:0回答:1

我打算在 Google Colab 中安装 Chatterbot,但一直无法安装。

直接使用

!pip install chatterbot
时出现错误。下面是我的代码和错误消息的屏幕截图。恳请高手给出解决方案!!谢谢你。

!pip install chatterbot

Collecting chatterbot Downloading ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.8/67.8 kB 2.0 MB/s eta 0:00:00 Collecting mathparse<0.2,>=0.1 (from chatterbot) Downloading mathparse-0.1.2-py3-none-any.whl (7.2 kB) Requirement already satisfied: nltk<4.0,>=3.2 in /usr/local/lib/python3.10/dist-packages (from chatterbot) (3.8.1) Collecting pint>=0.8.1 (from chatterbot) Downloading Pint-0.22-py3-none-any.whl (294 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.0/294.0 kB 11.9 MB/s eta 0:00:00 Collecting pymongo<4.0,>=3.3 (from chatterbot) Downloading pymongo-3.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (516 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 516.2/516.2 kB 49.8 MB/s eta 0:00:00 Collecting python-dateutil<2.8,>=2.7 (from chatterbot) Downloading python_dateutil-2.7.5-py2.py3-none-any.whl (225 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 225.7/225.7 kB 24.3 MB/s eta 0:00:00 Collecting pyyaml<5.2,>=5.1 (from chatterbot) Downloading PyYAML-5.1.2.tar.gz (265 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 265.0/265.0 kB 29.2 MB/s eta 0:00:00 error: subprocess-exited-with-error

× python setup.py Egg_info 未成功运行。 │ 退出代码:1 ╰─> 请参阅上面的输出。

注意:此错误源自子进程,并且可能不是 pip 的问题。 准备元数据(setup.py)...错误 错误:元数据生成失败

× 生成包元数据时遇到错误。 ╰─> 请参阅上面的输出。

注意:这是上面提到的包的问题,而不是 pip 的问题。 提示:详情请参阅上文。

python pytorch google-colaboratory chatbot chatterbot
1个回答
0
投票

从您的错误中我可以看到您正在使用

python 3.10

但是,chatterbot 仅支持

Python >=3.4, <=3.8

文档链接:https://pypi.org/project/ChatterBot/

© www.soinside.com 2019 - 2024. All rights reserved.