Getting dependency error installing chatterbot

205 Views Asked by At

I am trying to create a chatbot using Python. When I run "pip3 install chatterbot" I get the error

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.

Querying ChatGPT, it suggested that version constraint on the 'wheel' package specified by the 'preshed' dependency is causing the issue. It suggested I install 'preshed' first by running 'pip install preshed==2.0.1', then retry installing chatterbot, but I still get the same error. I even created a virtual environment and installed it there, but I got the same error. How do I resolve this?

This is my pip list

Package    Version
---------- ----------
certifi    2023.11.17
cymem      2.0.8
murmurhash 1.0.10
pip        23.3.2

And I have python3 3.12.1 installed.

Here's the full error

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.tar.gz (804 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
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-cp312-cp312-macosx_10_9_x86_64.whl.metadata (3.2 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.8-cp312-cp312-macosx_10_9_x86_64.whl.metadata (8.4 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.

Thanks.

1

There are 1 best solutions below

1
On

I use Anaconda and jupyter notebook. Try to create a new environment in Anaconda Navigator and choose to install python version 3.7.16.