Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatterbot import error #2343

Open
Sateesh1432 opened this issue Dec 12, 2023 · 4 comments
Open

Chatterbot import error #2343

Sateesh1432 opened this issue Dec 12, 2023 · 4 comments

Comments

@Sateesh1432
Copy link

Sateesh1432 commented Dec 12, 2023

while installing chatterbot using command pip install chatterbot.
I am getting the following error

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 (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-cp39-cp39-win_amd64.whl (394 kB)
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)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting spacy<2.2,>=2.1 (from chatterbot)
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 1

[153 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-cp39-cp39-win_amd64.whl.metadata (3.2 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.8-cp39-cp39-win_amd64.whl.metadata (8.6 kB)
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 'done'
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.10-cp39-cp39-win_amd64.whl.metadata (2.0 kB)
Collecting thinc<7.1.0,>=7.0.8
Using cached thinc-7.0.8-cp39-cp39-win_amd64.whl
Collecting blis<0.3.0,>=0.2.1 (from thinc<7.1.0,>=7.0.8)
Using cached blis-0.2.4.tar.gz (1.5 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting wasabi<1.1.0,>=0.0.9 (from thinc<7.1.0,>=7.0.8)
Using cached wasabi-0.10.1-py3-none-any.whl (26 kB)
Collecting srsly<1.1.0,>=0.0.6 (from thinc<7.1.0,>=7.0.8)
Using cached srsly-1.0.7-cp39-cp39-win_amd64.whl.metadata (14 kB)
Collecting numpy>=1.7.0 (from thinc<7.1.0,>=7.0.8)
Using cached numpy-1.26.2-cp39-cp39-win_amd64.whl.metadata (61 kB)
Collecting plac<1.0.0,>=0.9.6 (from thinc<7.1.0,>=7.0.8)
Using cached plac-0.9.6-py2.py3-none-any.whl (20 kB)
Collecting tqdm<5.0.0,>=4.10.0 (from thinc<7.1.0,>=7.0.8)
Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)
Collecting colorama (from tqdm<5.0.0,>=4.10.0->thinc<7.1.0,>=7.0.8)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Using cached setuptools-69.0.2-py3-none-any.whl (819 kB)
Using cached Cython-3.0.6-cp39-cp39-win_amd64.whl (2.8 MB)
Using cached cymem-2.0.8-cp39-cp39-win_amd64.whl (39 kB)
Using cached murmurhash-1.0.10-cp39-cp39-win_amd64.whl (25 kB)
Using cached numpy-1.26.2-cp39-cp39-win_amd64.whl (15.8 MB)
Using cached srsly-1.0.7-cp39-cp39-win_amd64.whl (358 kB)
Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
Building wheels for collected packages: preshed, blis
Building wheel for preshed (setup.py): started
Building wheel for preshed (setup.py): finished with status 'error'
error: subprocess-exited-with-error

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

[50 lines of output]
C:\Users\user\chatbot_creation\create_chatbot_venv\lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\preshed
copying preshed\about.py -> build\lib.win-amd64-cpython-39\preshed
copying preshed\__init__.py -> build\lib.win-amd64-cpython-39\preshed
creating build\lib.win-amd64-cpython-39\preshed\tests
copying preshed\tests\test_counter.py -> build\lib.win-amd64-cpython-39\preshed\tests
copying preshed\tests\test_hashing.py -> build\lib.win-amd64-cpython-39\preshed\tests
copying preshed\tests\test_pop.py -> build\lib.win-amd64-cpython-39\preshed\tests
copying preshed\tests\__init__.py -> build\lib.win-amd64-cpython-39\preshed\tests
copying preshed\counter.pyx -> build\lib.win-amd64-cpython-39\preshed
copying preshed\maps.pyx -> build\lib.win-amd64-cpython-39\preshed
copying preshed\counter.pxd -> build\lib.win-amd64-cpython-39\preshed
copying preshed\maps.pxd -> build\lib.win-amd64-cpython-39\preshed
copying preshed\__init__.pxd -> build\lib.win-amd64-cpython-39\preshed
running build_ext
building 'preshed.maps' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\preshed
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\user\chatbot_creation\create_chatbot_venv\include -IC:\Users\user\chatbot_creation\create_chatbot_venv\include -IC:\Users\user\chatbot_creation\create_chatbot_venv\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tppreshed/maps.cpp /Fobuild\temp.win-amd64-cpython-39\Release\preshed/maps.obj /Ox /EHsc
maps.cpp
preshed/maps.cpp(5728): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\user\chatbot_creation\create_chatbot_venv\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5740): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\user\chatbot_creation\create_chatbot_venv\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5749): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\user\chatbot_creation\create_chatbot_venv\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5755): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\user\chatbot_creation\create_chatbot_venv\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5761): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\user\chatbot_creation\create_chatbot_venv\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5767): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\user\chatbot_creation\create_chatbot_venv\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(6129): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
preshed/maps.cpp(6145): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for preshed
Running setup.py clean for preshed
Building wheel for blis (setup.py): started
Building wheel for blis (setup.py): finished with status 'error'
error: subprocess-exited-with-error

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

[35 lines of output]
BLIS_COMPILER? None
C:\Users\user\chatbot_creation\create_chatbot_venv\lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\blis
copying blis\about.py -> build\lib.win-amd64-cpython-39\blis
copying blis\benchmark.py -> build\lib.win-amd64-cpython-39\blis
copying blis\__init__.py -> build\lib.win-amd64-cpython-39\blis
creating build\lib.win-amd64-cpython-39\blis\tests
copying blis\tests\common.py -> build\lib.win-amd64-cpython-39\blis\tests
copying blis\tests\test_dotv.py -> build\lib.win-amd64-cpython-39\blis\tests
copying blis\tests\test_gemm.py -> build\lib.win-amd64-cpython-39\blis\tests
copying blis\tests\__init__.py -> build\lib.win-amd64-cpython-39\blis\tests
copying blis\cy.pyx -> build\lib.win-amd64-cpython-39\blis
copying blis\py.pyx -> build\lib.win-amd64-cpython-39\blis
copying blis\cy.pxd -> build\lib.win-amd64-cpython-39\blis
copying blis\__init__.pxd -> build\lib.win-amd64-cpython-39\blis
running build_ext
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\user\AppData\Local\Temp\pip-install-lxxryof1\blis_7072fe55ec9746aaabc21a97c43f8d77\blis\_src\config\bulldozer\bli_cntx_init_bulldozer.c -o C:\Users\user\AppData\Local\Temp\tmpisavfj2p\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\user\AppData\Local\Temp\pip-install-lxxryof1\blis_7072fe55ec9746aaabc21a97c43f8d77\blis\_src\include\windows-x86_64
error: [WinError 2] The system cannot find the file specified
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for blis
Running setup.py clean for blis

Failed to build preshed blis
ERROR: Could not build wheels for preshed, blis, which is required to install pyproject.toml-based projects
[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.

Please solve the error and suggest best solution for this..Thanks in advance

@tylermeyers351
Copy link

I'm having a similar issue, could you let me know if you were able to resolve?

@lagrahhn
Copy link

我也遇到了这样的问题,似乎是新的版本有问题,下载1.0.4的chatterbot是可行的,pip install chatterbot -i https://pypi.tuna.tsinghua.edu.cn/simple,然后可能会报错缺少哪些模块,下载即可。如果,报错module 'time' has no attribute 'clock',到sqlalchemy\util\compat.py,将原来的time_func = time.clock修改为time.将clock更改为perf_counter。
You can install the 1.0.4 version, and if there are some error, you just install them. Then, if there is a error that module 'time' has no attribute 'clock', find the file path sqlalchemy\util\compat.py, replace time_func = time.clock to time_func = time.perf_counter.

@haydenjames
Copy link

ChatterBot last update was 3 years ago. Maybe not active anymore?

@KoenVanderBurg
Copy link

Same issue here, solved it by installing specific version chatterbot == 1.0.4 .
If this does not work, you can always try installing by cloning the repo and running setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants