使用 pip 安装聊天机器人时出错。我该如何解决它?

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

以下是尝试 pip install Chatterbot 后出现的错误。
操作系统:Windows 11
Python 版本:3.10.0
点版本:23.3.1

pip install chatterbot
Collecting chatterbot
  Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting mathparse<0.2,>=0.1 (from chatterbot)
  Using cached mathparse-0.1.2-py3-none-any.whl (7.2 kB)
Collecting nltk<4.0,>=3.2 (from chatterbot)
  Using cached nltk-3.8.1-py3-none-any.whl (1.5 MB)
Collecting pint>=0.8.1 (from chatterbot)
  Using cached Pint-0.23-py3-none-any.whl.metadata (8.1 kB)
Collecting pymongo<4.0,>=3.3 (from chatterbot)
  Using cached pymongo-3.13.0-cp310-cp310-win_amd64.whl (394 kB)
Collecting python-dateutil<2.8,>=2.7 (from chatterbot)
  Using cached python_dateutil-2.7.5-py2.py3-none-any.whl (225 kB)
Collecting pyyaml<5.2,>=5.1 (from chatterbot)
  Using cached PyYAML-5.1.2.tar.gz (265 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting spacy<2.2,>=2.1 (from chatterbot)
  Using cached spacy-2.1.9.tar.gz (30.7 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Collecting setuptools
        Using cached setuptools-69.0.2-py3-none-any.whl.metadata (6.3 kB)
      Collecting wheel<0.33.0,>0.32.0
        Using cached wheel-0.32.3-py2.py3-none-any.whl (21 kB)
      Collecting Cython
        Using cached Cython-3.0.6-cp310-cp310-win_amd64.whl.metadata (3.2 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.8-cp310-cp310-win_amd64.whl.metadata (8.6 kB)
      Collecting preshed<2.1.0,>=2.0.1
        Using cached preshed-2.0.1.tar.gz (113 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
      ERROR: Some build dependencies for preshed<2.1.0,>=2.0.1 from https://files.pythonhosted.org/packages/0b/14/c9aa735cb9c131545fc9e23031baccb87041ac9215b3d75f99e3cf18f6a3/preshed-2.0.1.tar.gz conflict with the backend dependencies: wheel==0.42.0 is incompatible with wheel>=0.32.0,<0.33.0.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`enter code here`

尝试的故障排除步骤: 我尝试使用 pip install --upgradewheel 升级wheel包。
我尝试使用 pip install wheel==0.32.3、pip install preshed==2.0.1 和 pip install chatterbot 安装冲突包的特定版本。

python pip chatterbot
2个回答
1
投票

ChatterBot 最新版本(1.0.8)目前支持 python 版本 3.4 - 3.8。您遇到此问题是因为您的 Python 版本是 3.10.0,因此 ChatterBot 1.0.8 不支持它。要解决此问题,请将 python 版本降级到任何受支持的版本。访问 https://pypi.org/project/ChatterBot/ 了解更多信息。


0
投票

我使用 Anaconda 和 Jupyter Notebook。尝试在Anaconda Navigator中创建一个新环境,并选择安装Python版本3.7.16。

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