安装chatterbot 出现报错参考

本人的python版本:3.8.1 ;conda版本:2.1.1

出现报错信息如下:

C:\Users\ab263>pip install ChatterBot
Collecting ChatterBot
  Using cached ChatterBot-1.0.5-py2.py3-none-any.whl.metadata (8.1 kB)
Collecting mathparse<0.2,>=0.1 (from ChatterBot)
  Using cached mathparse-0.1.2-py3-none-any.whl.metadata (776 bytes)
Requirement already satisfied: nltk<4.0,>=3.2 in c:\users\ab263\appdata\local\programs\python\python38\lib\site-packages (from ChatterBot) (3.9.1)
Collecting pint>=0.8.1 (from ChatterBot)
  Using cached Pint-0.21.1-py3-none-any.whl.metadata (7.8 kB)
Collecting pymongo<4.0,>=3.3 (from ChatterBot)
  Using cached pymongo-3.13.0-cp38-cp38-win_amd64.whl.metadata (9.8 kB)
Collecting python-dateutil<2.8,>=2.7 (from ChatterBot)
  Using cached python_dateutil-2.7.5-py2.py3-none-any.whl.metadata (7.5 kB)
Collecting pyyaml<5.2,>=5.1 (from ChatterBot)
  Using cached PyYAML-5.1.2.tar.gz (265 kB)
  Preparing metadata (setup.py) ... 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
  ╰─> [41 lines of output]
      Collecting setuptools
        Using cached setuptools-75.3.2-py3-none-any.whl.metadata (6.9 kB)
      Collecting wheel<0.33.0,>0.32.0
        Using cached wheel-0.32.3-py2.py3-none-any.whl.metadata (2.1 kB)
      Collecting Cython
        Using cached Cython-3.0.12-cp38-cp38-win_amd64.whl.metadata (3.4 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.11.tar.gz (10 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'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting preshed<2.1.0,>=2.0.1
        Using cached preshed-2.0.1.tar.gz (113 kB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'error'
        error: subprocess-exited-with-error

        python setup.py egg_info did not run successfully.
        exit code: 1

        [6 lines of output]
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "C:\Users\ab263\AppData\Local\Temp\pip-install-kwfca74v\preshed_3da0aa21a0dd4517851d5fb3c7fb4cf5\setup.py", line 9, in <module>
            from distutils import ccompiler, msvccompiler
        ImportError: cannot import name 'msvccompiler' from 'distutils' (c:\users\ab263\appdata\local\programs\python\python38\lib\site-packages\setuptools\_distutils\__init__.py)
        [end of output]

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

      Encountered error while generating package metadata.

      See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [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.

    

解决方法:

更改命令为pip install chatterbot==1.0.2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值