Closed SouravMalliK closed 5 years ago
Hi there, the latest stable release of chatterbot (1.0.5) should work. The error you have usually means that the Python version you're using to run flask-chatterbot doesn't have the chatterbot requirement installed. If you installed the packages one-by-one, could you try re-installing them in one go using pip install -r requirements.txt
?
After that you can verify the version of chatterbot you installed by running this in the same Python version:
import chatterbot
print(chatterbot.__version__)
Let me know how it goes!
Hi, Thanks for the reply.. I did create a Conda environment which has chatterbot 1.0.5 installed.. now the code is not able to find Storage module within chatterbot StorageAdapter class.
from chatterbot.storage import StorageAdapter ImportError: No module named storage
I my environment.yaml file looks like this
channels:
- defaults
dependencies:
- python=3.6.4
- pip:
- Flask==1.0.0
- chatterbot==1.0.5
- chatterbot-corpus==1.2.0
- SQLAlchemy==1.2```
What is missing in my configuration?
The issue is resolved by activating the correct environment. Thanks.
How the module not found error is resolved? please help me even i have same error
How the module not found error is resolved? please help me even i have same error
I created a virtual environment and activated the environment to access the modules.
Same problem with me, I did this.
C:\Users\Home>pip install -U chatterbot Collecting chatterbot Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB) Collecting mathparse<0.2,>=0.1 Using cached mathparse-0.1.2-py3-none-any.whl (7.2 kB) Collecting pyyaml<5.2,>=5.1 Downloading PyYAML-5.1.2.tar.gz (265 kB) ---------------------------------------- 265.0/265.0 kB 4.1 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting nltk<4.0,>=3.2 Using cached nltk-3.7-py3-none-any.whl (1.5 MB) Collecting sqlalchemy<1.3,>=1.2 Using cached SQLAlchemy-1.2.19.tar.gz (5.7 MB) Preparing metadata (setup.py) ... done Collecting python-dateutil<2.8,>=2.7 Using cached python_dateutil-2.7.5-py2.py3-none-any.whl (225 kB) Collecting spacy<2.2,>=2.1 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 ╰─> [79 lines of output] Collecting setuptools Using cached setuptools-65.3.0-py3-none-any.whl (1.2 MB) 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.32-py2.py3-none-any.whl (986 kB) Collecting cymem<2.1.0,>=2.0.2 Using cached cymem-2.0.6-cp39-cp39-win_amd64.whl (36 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.8-cp39-cp39-win_amd64.whl (18 kB) Collecting thinc<7.1.0,>=7.0.8 Using cached thinc-7.0.8.tar.gz (1.9 MB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting blis<0.3.0,>=0.2.1 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 Using cached wasabi-0.10.1-py3-none-any.whl (26 kB) Collecting srsly<1.1.0,>=0.0.6 Using cached srsly-1.0.5-cp39-cp39-win_amd64.whl (177 kB) Collecting numpy>=1.7.0 Using cached numpy-1.23.3-cp39-cp39-win_amd64.whl (14.7 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.64.1-py2.py3-none-any.whl (78 kB) Collecting colorama Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB) Using legacy 'setup.py install' for preshed, since package 'wheel' is not installed. Using legacy 'setup.py install' for thinc, since package 'wheel' is not installed. Using legacy 'setup.py install' for blis, since package 'wheel' is not installed. Installing collected packages: wasabi, srsly, plac, cymem, wheel, setuptools, preshed, numpy, murmurhash, Cython, colorama, tqdm, blis, thinc Running setup.py install for preshed: started Running setup.py install for preshed: finished with status 'error' error: subprocess-exited-with-error
Running setup.py install for preshed did not run successfully.
exit code: 1
[22 lines of output]
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\preshed
copying preshed\about.py -> build\lib.win-amd64-3.9\preshed
copying preshed\__init__.py -> build\lib.win-amd64-3.9\preshed
creating build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\test_counter.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\test_hashing.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\test_pop.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\__init__.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\counter.pyx -> build\lib.win-amd64-3.9\preshed
copying preshed\maps.pyx -> build\lib.win-amd64-3.9\preshed
copying preshed\counter.pxd -> build\lib.win-amd64-3.9\preshed
copying preshed\maps.pxd -> build\lib.win-amd64-3.9\preshed
copying preshed\__init__.pxd -> build\lib.win-amd64-3.9\preshed
running build_ext
building 'preshed.maps' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
preshed
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[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.
What do I do now?
Same problem with me, I did this.
C:\Users\Home>pip install -U chatterbot Collecting chatterbot Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB) Collecting mathparse<0.2,>=0.1 Using cached mathparse-0.1.2-py3-none-any.whl (7.2 kB) Collecting pyyaml<5.2,>=5.1 Downloading PyYAML-5.1.2.tar.gz (265 kB) ---------------------------------------- 265.0/265.0 kB 4.1 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting nltk<4.0,>=3.2 Using cached nltk-3.7-py3-none-any.whl (1.5 MB) Collecting sqlalchemy<1.3,>=1.2 Using cached SQLAlchemy-1.2.19.tar.gz (5.7 MB) Preparing metadata (setup.py) ... done Collecting python-dateutil<2.8,>=2.7 Using cached python_dateutil-2.7.5-py2.py3-none-any.whl (225 kB) Collecting spacy<2.2,>=2.1 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 ╰─> [79 lines of output] Collecting setuptools Using cached setuptools-65.3.0-py3-none-any.whl (1.2 MB) 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.32-py2.py3-none-any.whl (986 kB) Collecting cymem<2.1.0,>=2.0.2 Using cached cymem-2.0.6-cp39-cp39-win_amd64.whl (36 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.8-cp39-cp39-win_amd64.whl (18 kB) Collecting thinc<7.1.0,>=7.0.8 Using cached thinc-7.0.8.tar.gz (1.9 MB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting blis<0.3.0,>=0.2.1 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 Using cached wasabi-0.10.1-py3-none-any.whl (26 kB) Collecting srsly<1.1.0,>=0.0.6 Using cached srsly-1.0.5-cp39-cp39-win_amd64.whl (177 kB) Collecting numpy>=1.7.0 Using cached numpy-1.23.3-cp39-cp39-win_amd64.whl (14.7 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.64.1-py2.py3-none-any.whl (78 kB) Collecting colorama Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB) Using legacy 'setup.py install' for preshed, since package 'wheel' is not installed. Using legacy 'setup.py install' for thinc, since package 'wheel' is not installed. Using legacy 'setup.py install' for blis, since package 'wheel' is not installed. Installing collected packages: wasabi, srsly, plac, cymem, wheel, setuptools, preshed, numpy, murmurhash, Cython, colorama, tqdm, blis, thinc Running setup.py install for preshed: started Running setup.py install for preshed: finished with status 'error' error: subprocess-exited-with-error
Running setup.py install for preshed did not run successfully. exit code: 1 [22 lines of output] WARNING: The wheel package is not available. running install running build running build_py creating build creating build\lib.win-amd64-3.9 creating build\lib.win-amd64-3.9\preshed copying preshed\about.py -> build\lib.win-amd64-3.9\preshed copying preshed\__init__.py -> build\lib.win-amd64-3.9\preshed creating build\lib.win-amd64-3.9\preshed\tests copying preshed\tests\test_counter.py -> build\lib.win-amd64-3.9\preshed\tests copying preshed\tests\test_hashing.py -> build\lib.win-amd64-3.9\preshed\tests copying preshed\tests\test_pop.py -> build\lib.win-amd64-3.9\preshed\tests copying preshed\tests\__init__.py -> build\lib.win-amd64-3.9\preshed\tests copying preshed\counter.pyx -> build\lib.win-amd64-3.9\preshed copying preshed\maps.pyx -> build\lib.win-amd64-3.9\preshed copying preshed\counter.pxd -> build\lib.win-amd64-3.9\preshed copying preshed\maps.pxd -> build\lib.win-amd64-3.9\preshed copying preshed\__init__.pxd -> build\lib.win-amd64-3.9\preshed running build_ext building 'preshed.maps' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure Encountered error while trying to install package. preshed note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. [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.
What do I do now?
I got the same error i downgraded pip to 21.3.1 it worked pip install pip==21.3.1
Not able to execute the app.py. Installed all the packages as per the requirement.txt. Throwing this error. This
Traceback (most recent call last): File "app.py", line 2, in <module> from chatterbot import ChatBot ModuleNotFoundError: No module named 'chatterbot'
What is the correct version of ChatBot should we use for this app?