I tried to install chatterbot using pip install chatterbot
, but I got the following error:
(venv) PS E:\Django\Unit scripts\Chattterbot> 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)
Collecting nltk<4.0,>=3.2 (from chatterbot)
Using cached nltk-3.9.1-py3-none-any.whl.metadata (2.9 kB)
Collecting pint>=0.8.1 (from chatterbot)
Using cached Pint-0.24.3-py3-none-any.whl.metadata (8.5 kB)
Collecting pymongo<4.0,>=3.3 (from chatterbot)
Using cached pymongo-3.13.0-cp310-cp310-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) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [34 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\fenil\AppData\Local\Temp\pip-install-1nfznzcy\pyyaml_c1d691730a24495487f1ad7db975044d\setup.py", line 291, in <module>
setup(
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
return run_commands(dist)
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
dist.run_commands()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\dist.py", line 950, in run_command
super().run_command(command)
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\command\egg_info.py", line 311, in run
self.find_sources()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\command\egg_info.py", line 319, in find_sources
mm.run()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\command\egg_info.py", line 540, in run
self.add_defaults()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\command\egg_info.py", line 578, in add_defaults
sdist.add_defaults(self)
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\command\sdist.py", line 108, in add_defaults
super().add_defaults()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\command\sdist.py", line 250, in add_defaults
self._add_defaults_ext()
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\command\sdist.py", line 335, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
File "C:\Users\fenil\AppData\Local\Temp\pip-install-1nfznzcy\pyyaml_c1d691730a24495487f1ad7db975044d\setup.py", line 199, in get_source_files
self.cython_sources(ext.sources, ext)
File "E:\Django\Unit scripts\Chattterbot\venv\lib\site-packages\setuptools\_distutils\cmd.py", line 107, in __getattr__
raise AttributeError(attr)
AttributeError: cython_sources
[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.
I have tried all of the following, nothing worked for me, the error still persists:
pip install --upgrade setuptools --user python
pip3 install --upgrade setuptools
pip install cython
pip install chatterbot==1.0.4
pip install --upgrade pip setuptools wheel
pip install git+git://github.com/gunthercox/ChatterBot.git@master
pip install wheel cython
Any ideas? Thanks.
Information available on PyPi shows that ChatterBot Requires: Python >=3.4, <=3.8. This means there's no support for your Python 3.10.
You may have to downgrade to Python 3.8 to use this package. See https://pypi.org/project/ChatterBot/#data