gunthercox / ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots
https://chatterbot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
13.96k stars 4.42k forks source link

Chatterbot Installation Error #2351

Open anuj-77 opened 4 months ago

anuj-77 commented 4 months ago

C:\Windows\System32>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.metadata (2.8 kB) 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) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [11 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 14, in File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools__init.py", line 16, in import setuptools.version File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\version.py", line 1, in import pkg_resources File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\init__.py", line 2191, in register_finder(pkgutil.ImpImporter, find_on_path) ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? [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.

Getting this while installing Chatterbot, can anyone help me with this?

jean0t commented 2 months ago

Looks like the python it uses is older than what you have in your system. I tried to install it today and when I did through github, it said that python 3.10 isn't in the supported range 3.4 till 3.8. To be honest I don't remember the lower limit, but it shows 3.8 as the max version supported

UsernameNo-001 commented 2 months ago

I've tried to use python version 3.6 but now it shows the following:

Traceback (most recent call last): File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\confection__init__.py", line 38, in from pydantic.v1 import BaseModel, Extra, ValidationError, create_model File "pydantic__init.py", line 2, in init pydantic.init__ File "pydantic\dataclasses.py", line 4, in init pydantic.dataclasses import types File "pydantic\error_wrappers.py", line 4, in init pydantic.error_wrappers File "pydantic\json.py", line 12, in init pydantic.json File "pydantic\types.py", line 28, in init pydantic.types yield File "pydantic\validators.py", line 9, in init pydantic.validators ImportError: cannot import name Deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:/Users/billy/Chatbot.py", line 1, in from chatterbot import ChatBot File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot__init.py", line 4, in from .chatterbot import ChatBot File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\chatterbot.py", line 2, in from chatterbot.storage import StorageAdapter File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage__init.py", line 1, in from chatterbot.storage.storage_adapter import StorageAdapter File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in from chatterbot.tagging import PosLemmaTagger File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\tagging.py", line 3, in import spacy File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\spacy__init__.py", line 6, in from .errors import setup_default_warnings File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\spacy\errors.py", line 3, in from .compat import Literal File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\spacy\compat.py", line 4, in from thinc.util import copy_array File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\thinc\init.py", line 5, in from .config import registry File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\thinc\config.py", line 2, in import confection File "C:\Users\billy\AppData\Local\Programs\Python\Python36\lib\site-packages\confection\init__.py", line 42, in from pydantic import BaseModel, create_model, ValidationError, Extra # type: ignore File "pydantic\init.py", line 2, in init pydantic.init__ File "pydantic\dataclasses.py", line 4, in init pydantic.dataclasses import types File "pydantic\error_wrappers.py", line 4, in init pydantic.error_wrappers
File "pydantic\json.py", line 12, in init pydantic.json File "pydantic\types.py", line 26, in init pydantic.types

ImportError: cannot import name errors

frozenproof commented 2 months ago

Python 3.7.9 is the only functional version for this library now