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
14.09k stars 4.44k forks source link

error with "pip install chatterbot" python 3.8.1 32 bit #1919

Closed SergioLopezJAAS closed 4 years ago

SergioLopezJAAS commented 4 years ago

This is the error display

C:\>pip` install chatterbot
Collecting chatterbot
  Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting pyyaml<5.2,>=5.1
  Using cached PyYAML-5.1.2.tar.gz (265 kB)
Collecting mathparse<0.2,>=0.1
  Using cached mathparse-0.1.2-py3-none-any.whl (7.2 kB)
Collecting pymongo<4.0,>=3.3
  Using cached pymongo-3.10.1-cp38-cp38-win32.whl (349 kB)
Requirement already satisfied: nltk<4.0,>=3.2 in c:\python38-32\lib\site-packages (from chatterbot) (3.4.5)
Collecting pint>=0.8.1
  Using cached Pint-0.11-py2.py3-none-any.whl (186 kB)
Collecting pytz
  Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Collecting spacy<2.2,>=2.1
  Using cached spacy-2.1.9.tar.gz (30.7 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python38-32\python.exe' 'c:\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-build-env-4ry6vq4a\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0'
       cwd: None
  Complete output (66 lines):
  Collecting setuptools
    Using cached setuptools-45.2.0-py3-none-any.whl (584 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-0.29.15-cp38-cp38-win32.whl (1.6 MB)
  Collecting cymem<2.1.0,>=2.0.2
    Using cached cymem-2.0.3.tar.gz (51 kB)
  Collecting preshed<2.1.0,>=2.0.1
    Using cached preshed-2.0.1.tar.gz (113 kB)
  Collecting murmurhash<1.1.0,>=0.28.0
    Using cached murmurhash-1.0.2.tar.gz (35 kB)
  Collecting thinc<7.1.0,>=7.0.8
    Using cached thinc-7.0.8.tar.gz (1.9 MB)
  Collecting blis<0.3.0,>=0.2.1
    Using cached blis-0.2.4.tar.gz (1.5 MB)
  Collecting wasabi<1.1.0,>=0.0.9
    Using cached wasabi-0.6.0-py3-none-any.whl (20 kB)
  Collecting srsly<1.1.0,>=0.0.6
    Using cached srsly-1.0.1.tar.gz (192 kB)
  Collecting numpy>=1.7.0
    Using cached numpy-1.18.1-cp38-cp38-win32.whl (10.8 MB)
  Collecting plac<1.0.0,>=0.9.6
    Using cached plac-0.9.6-py2.py3-none-any.whl (20 kB)
  Collecting tqdm<5.0.0,>=4.10.0
    Using cached tqdm-4.43.0-py2.py3-none-any.whl (59 kB)
  Installing collected packages: setuptools, wheel, Cython, cymem, preshed, murmurhash, numpy, blis, wasabi, srsly, plac, tqdm, thinc
      Running setup.py install for cymem: started
      Running setup.py install for cymem: finished with status 'done'
      Running setup.py install for preshed: started
      Running setup.py install for preshed: finished with status 'done'
      Running setup.py install for murmurhash: started
      Running setup.py install for murmurhash: finished with status 'done'
      Running setup.py install for blis: started
      Running setup.py install for blis: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: 'c:\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Sergio Lopez\\AppData\\Local\\Temp\\pip-install-9j8tfmi8\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\Sergio Lopez\\AppData\\Local\\Temp\\pip-install-9j8tfmi8\\blis\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-record-ps2744bk\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-build-env-4ry6vq4a\overlay' --compile --install-headers 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-build-env-4ry6vq4a\overlay\Include\blis'
           cwd: C:\Users\Sergio Lopez\AppData\Local\Temp\pip-install-9j8tfmi8\blis\
      Complete output (25 lines):
      BLIS_COMPILER? None
      running install
      running build
      running build_py
      creating build
      creating build\lib.win32-3.8
      creating build\lib.win32-3.8\blis
      copying blis\about.py -> build\lib.win32-3.8\blis
      copying blis\benchmark.py -> build\lib.win32-3.8\blis
      copying blis\__init__.py -> build\lib.win32-3.8\blis
      creating build\lib.win32-3.8\blis\tests
      copying blis\tests\common.py -> build\lib.win32-3.8\blis\tests
      copying blis\tests\test_dotv.py -> build\lib.win32-3.8\blis\tests
      copying blis\tests\test_gemm.py -> build\lib.win32-3.8\blis\tests
      copying blis\tests\__init__.py -> build\lib.win32-3.8\blis\tests
      copying blis\cy.pyx -> build\lib.win32-3.8\blis
      copying blis\py.pyx -> build\lib.win32-3.8\blis
      copying blis\cy.pxd -> build\lib.win32-3.8\blis
      copying blis\__init__.pxd -> build\lib.win32-3.8\blis
      running build_ext
      error: [WinError 2] El sistema no puede encontrar el archivo especificado
      msvc
      py_compiler msvc
      {'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'HOSTTYPE': 'x86_64', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LANG': 'C.UTF-8', 'OLDPWD': '/home/matt/repos/flame-blis', 'VIRTUAL_ENV': '/home/matt/repos/cython-blis/env3.6', 'USER': 'matt', 'PWD': '/home/matt/repos/cython-blis', 'HOME': '/home/matt', 'NAME': 'LAPTOP-OMKOB3VM', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'SHELL': '/bin/bash', 'TERM': 'xterm-256color', 'SHLVL': '1', 'LOGNAME': 'matt', 'PATH': '/home/matt/repos/cython-blis/env3.6/bin:/tmp/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5/ConEmu/Scripts:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5/ConEmu:/mnt/c/Python37/Scripts:/mnt/c/Python37:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/LLVM/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/nodejs:/mnt/c/Users/matt/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/matt/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/matt/AppData/Roaming/npm:/snap/bin:/mnt/c/Program Files/Oracle/VirtualBox', 'PS1': '(env3.6) \\[\\e]0;\\u@\\h: \\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ', 'VAGRANT_HOME': '/home/matt/.vagrant.d/', 'LESSOPEN': '| /usr/bin/lesspipe %s', '_': '/home/matt/repos/cython-blis/env3.6/bin/python'}
      clang -c C:\Users\Sergio Lopez\AppData\Local\Temp\pip-install-9j8tfmi8\blis\blis\_src\config\bulldozer\bli_cntx_init_bulldozer.c -o C:\Users\SERGIO~1\AppData\Local\Temp\tmpuzs2uxyo\bli_cntx_init_bulldozer.o -O2 -funroll-all-loops -std=c99 -D_POSIX_C_SOURCE=200112L -DBLIS_VERSION_STRING="0.5.0-6" -DBLIS_IS_BUILDING_LIBRARY -Iinclude\windows-x86_64 -I.\frame\3\ -I.\frame\ind\ukernels\ -I.\frame\1m\ -I.\frame\1f\ -I.\frame\1\ -I.\frame\include -IC:\Users\Sergio Lopez\AppData\Local\Temp\pip-install-9j8tfmi8\blis\blis\_src\include\windows-x86_64
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'c:\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Sergio Lopez\\AppData\\Local\\Temp\\pip-install-9j8tfmi8\\blis\\setup.py'"'"'; __file__='"'"'C:\\Users\\Sergio Lopez\\AppData\\Local\\Temp\\pip-install-9j8tfmi8\\blis\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-record-ps2744bk\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-build-env-4ry6vq4a\overlay' --compile --install-headers 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-build-env-4ry6vq4a\overlay\Include\blis' Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python38-32\python.exe' 'c:\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Sergio Lopez\AppData\Local\Temp\pip-build-env-4ry6vq4a\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0' Check the logs for full command output.
brntoledo commented 4 years ago

I'm having the same ERROR here! Can anyone help us?

mustious commented 4 years ago

Hello, try installing Chatterbot v1.0.2 pip install chatterbot==1.0.2

Amankundra123 commented 4 years ago

it worked tysm@mustious

SergioLopezJAAS commented 4 years ago

Thanks you,

Really, that works

pip install chatterbot==1.0.2

Bye

A95Milan commented 4 years ago

thank you,it really worked for me

DipakAmbhure commented 4 years ago

thank you so much

gabrielcalmon commented 4 years ago

Thank you so much! Now it worked

Hrudayangam commented 4 years ago

thanks fam

gilbert43 commented 4 years ago

thanks it worked

anilkumar541 commented 4 years ago

Hello, try installing Chatterbot v1.0.2 pip install chatterbot==1.0.2

thanks man it worked

gusutabo commented 4 years ago

Thank you so much!

pmuller2010 commented 4 years ago

Thank you very much, I solved the error.

AadilFarhan29 commented 4 years ago

@mustious so i tried using that and i got this error plss help:

Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partia l uninstall.

pmuller2010 commented 4 years ago

@mustious so i tried using that and i got this error plss help:

Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partia l uninstall.


I did not uninstall anything. Just install the version that says there (pip install chatterbot == 1.0.2) I had tried other versions and they also gave me an error. Maybe you can try other versions. Sorry, I'm new to python, I don't have a lot of knowledge yet.

devuc commented 3 years ago

thanks guys it worked ☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺

devuc commented 3 years ago

you are guru of every one

Mount-Isaac commented 3 years ago

I'm using python 3.9.2 to install chatterbot but I recursively get this error: ERROR: Package 'chatterbot' requires a different Python: 3.9.2 not in '<=3.8,>=3.4'. Help

mustious commented 3 years ago

I'm using python 3.9.2 to install chatterbot but I recursively get this error: ERROR: Package 'chatterbot' requires a different Python: 3.9.2 not in '<=3.8,>=3.4'. Help

Hey Isaac. I think the best option is to downgrade to python 3.8 or less. If you don't want to downgrade your system python then try creating a python virtual environment which uses python version 3.8 or less too. It's also possible to bypass this by modifying the setup.py file in the chatterbot package tar.gz file which can be downloaded from https://pypi.org/project/ChatterBot/#files in order for it to run on python 3.92. Though this method often run into other errors.

tanmay-dhawale commented 3 years ago

Thanks man you saved my day

Mount-Isaac commented 3 years ago

Thanks man you saved my day

welcome bro, but I would advise you to clone the Chatterbot module from git and install it via terminal rather than downloading it directly from pip if you don't want the pip downgrade. I say so because upon downgrading pip, it will frequently prompt you with pip updates while executing your tasks.

bugaje commented 3 years ago

@mustious so i tried using that and i got this error plss help:

Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partia l uninstall.

Hello, try installing using 'pip install sugaroid-chatterbot'

sifunapinton commented 2 years ago

You dawg... Thanks mate

ehernandezvilla commented 1 year ago

It works, tks!

Debbydawn commented 1 year ago

Hello, i have virtually tried everyone of this, the chatterbot installs but when i use it in my py i have errors

mustious commented 1 year ago

Hello, i have virtually tried everyone of this, the chatterbot installs but when i use it in my py i have errors

Hello Debby, Please mind sharing the errors you are having :)

Debbydawn commented 1 year ago

Hello, This is my code:

Import ChatBot from chatterbot

from chatterbot import ChatBot from chatterbot.trainers import ListTrainer import time

Create a ChatBot instance

bot = ChatBot("Michade Farms", read_only=False, logic_adapters=["chatterbot.logic.BestMatch"])

List of phrases to train the chatbot

list_to_train = [ "Hi", "Hi there", "What's your name?", "I'm a Michade chatbot", "How old are you?", "I don't have an age" ]

Create a ListTrainer instance and train the chatbot

list_trainer = ListTrainer(bot) list_trainer.train(list_to_train)

Get user input and get bot's response

while True: user_input = input("User: ") response = bot.get_response(user_input) print("Bot:", response)

# Break the loop if the user enters 'bye'
if user_input.lower() == "bye":
    break

And this is the error after install all different forms of chatterbot:


AttributeError Traceback (most recent call last) Input In [1], in <cell line: 7>() 4 import time 6 # Create a ChatBot instance ----> 7 bot = ChatBot("Michade Farms", read_only=False, logic_adapters=["chatterbot.logic.BestMatch"]) 9 # List of phrases to train the chatbot 10 list_to_train = [ 11 "Hi", 12 "Hi there", (...) 16 "I don't have an age" 17 ]

File ~\anaconda3\lib\site-packages\chatterbot\chatterbot.py:34, in ChatBot.init(self, name, kwargs) 31 # Logic adapters used by the chat bot 32 self.logic_adapters = [] ---> 34 self.storage = utils.initialize_class(storage_adapter, kwargs) 36 for adapter in logic_adapters: 37 utils.validate_adapter_class(adapter, LogicAdapter)

File ~\anaconda3\lib\site-packages\chatterbot\utils.py:54, in initialize_class(data, *args, *kwargs) 51 else: 52 Class = import_module(data) ---> 54 return Class(args, **kwargs)

File ~\anaconda3\lib\site-packages\chatterbot\storage\sql_storage.py:22, in SQLStorageAdapter.init(self, kwargs) 19 def init(self, kwargs): 20 super().init(**kwargs) ---> 22 from sqlalchemy import create_engine 23 from sqlalchemy.orm import sessionmaker 25 self.database_uri = kwargs.get('database_uri', False)

File ~\anaconda3\lib\site-packages\sqlalchemy__init.py:8, in 1 # sqlalchemy/init__.py 2 # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors 3 # 4 # 5 # This module is part of SQLAlchemy and is released under 6 # the MIT License: http://www.opensource.org/licenses/mit-license.php ----> 8 from . import util as _util # noqa 9 from .inspection import inspect # noqa 10 from .schema import BLANK_SCHEMA # noqa

File ~\anaconda3\lib\site-packages\sqlalchemy\util__init__.py:14, in

11 from functools import partial # noqa 12 from functools import update_wrapper # noqa ---> 14 from ._collections import coerce_generator_arg # noqa 15 from ._collections import collections_abc # noqa 16 from ._collections import column_dict # noqa File ~\anaconda3\lib\site-packages\sqlalchemy\util\_collections.py:16, in 13 import types 14 import weakref ---> 16 from .compat import binary_types 17 from .compat import collections_abc 18 from .compat import itertools_filterfalse File ~\anaconda3\lib\site-packages\sqlalchemy\util\compat.py:264, in 261 from inspect import formatargspec as inspect_formatargspec # noqa 263 if win32 or jython: --> 264 time_func = time.clock 265 else: 266 time_func = time.time AttributeError: module 'time' has no attribute 'clock' Thanks. Best, Deborah. On Fri, 2 Jun 2023 at 15:11, Mustapha Abdullahi ***@***.***> wrote: > Hello, i have virtually tried everyone of this, the chatterbot installs > but when i use it in my py i have errors > > Hello Debby, Please mind sharing the errors you are having :) > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you commented.Message ID: > ***@***.***> >
mustious commented 1 year ago

I just did a quick check. This error might be caused by the current Python version you are using. Please try running the code with Python 3.7

CodeAkinori commented 1 year ago

how could i create an venv with another version in python?

papahawk-ai commented 1 year ago

how could i create an venv with another version in python?

Use 'altinstall' for alternative installation to not replace your default Python3 version.

tar zxvf Python-3.7.7.tgz cd Python-3.7.7 ./configure make make altinstall

Then use the version you need when creating (venv).

python3.7 -m venv 'example-project' source 'example-project'/bin/activate deactivate