chatterbot on windows (No module named 'chatterbot_corpus' error)
chatterbot환경 setup
ModuleNotFoundError: No module named 'chatterbot_corpus' error가 발생할 경우의 대처
1. 환경준비
Collecting PyYAML
Using cached https://files.pythonhosted.org/packages/f5/93/b5ebdabc7e450418c26a1395d995d878a59bc4272d6ac63d2ada922126ad/PyYAML-5.1.1-cp37-cp37m-win_amd64.whl
Installing collected packages: PyYAML
Found existing installation: PyYAML 5.1
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 partial uninstall.
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '61984' 'c:\work\python\test\chatbot.py'
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 85, in _run_code
File "c:\work\python\test\chatbot.py", line 1, in <module>
from chatterbot import ChatBot
from .chatterbot import ChatBot
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
from chatterbot.storage import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
from chatterbot.storage.storage_adapter import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
from chatterbot.tagging import PosHypernymTagger
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
from chatterbot.tokenizers import get_sentence_tokenizer
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
from chatterbot.corpus import load_corpus, list_corpus_files
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\corpus.py", line 5, in <module>
from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'
PS C:\work\python> conda activate base
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '61984' 'c:\work\python\test\chatbot.py'E00002.078: Exception escaped from start_client
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\log.py", line 110, in g
return f(*args, **kwargs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\pydevd_hooks.py", line 74, in start_client
sock, start_session = daemon.start_client((host, port))
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\daemon.py", line 217, in start_client
connect(client, addr)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\socket.py", line 197, in connect
sock.connect(addr)
ConnectionRefusedError: [WinError 10061] 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '62153' 'c:\work\python\test\chatbot.py'Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 85, in _run_code
File "c:\work\python\test\chatbot.py", line 1, in <module>
from chatterbot import ChatBot
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\__init__.py", line 4, in <module>
from .chatterbot import ChatBot
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
from chatterbot.storage import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
from chatterbot.storage.storage_adapter import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
from chatterbot.tagging import PosHypernymTagger
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
from chatterbot.tokenizers import get_sentence_tokenizer
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
from chatterbot.corpus import load_corpus, list_corpus_files
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\corpus.py", line 5, in <module>
from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'
PS C:\work\python> conda install -c anaconda pyyaml
WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3. Update or remove conda-build to get smaller downloads and faster extractions.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\sungm\Anaconda3
added / updated specs:
- pyyaml
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2019.1.23 | 0 158 KB anaconda
certifi-2019.3.9 | py37_0 155 KB anaconda
conda-4.7.5 | py37_0 3.0 MB anaconda
openssl-1.1.1b | he774522_1 5.7 MB anaconda
pyyaml-5.1 | py37he774522_0 162 KB anaconda
------------------------------------------------------------
Total: 9.2 MB
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates pkgs/main --> anaconda
certifi pkgs/main --> anaconda
conda pkgs/main --> anaconda
openssl pkgs/main --> anaconda
pyyaml pkgs/main --> anaconda
Proceed ([y]/n)? y
Downloading and Extracting Packages
conda-4.7.5 | 3.0 MB | ##################################################################################################### | 100%
pyyaml-5.1 | 162 KB | ##################################################################################################### | 100%
certifi-2019.3.9 | 155 KB | ##################################################################################################### | 100%
openssl-1.1.1b | 5.7 MB | ##################################################################################################### | 100%
ca-certificates-2019 | 158 KB | ##################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
PS C:\work\python>
PS C:\work\python\test> pip install chatterbot
Collecting chatterbot
Using cached https://files.pythonhosted.org/packages/6c/0e/dac0d82f34f86bf509cf5ef3e2dfc5aa7d444bd843a2330ceb7d854f84f2/ChatterBot-1.0.5-py2.py3-none-any.whl
Collecting pymongo<4.0,>=3.3 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/57/b0/acf286a558e19dc0992354181c8650dffc79fced47a4555e49ca70acf426/pymongo-3.8.0-cp37-cp37m-win_amd64.whl
Collecting python-dateutil<2.8,>=2.7 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl
Collecting pyyaml<5.2,>=5.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/f5/93/b5ebdabc7e450418c26a1395d995d878a59bc4272d6ac63d2ada922126ad/PyYAML-5.1.1-cp37-cp37m-win_amd64.whl
Collecting nltk<4.0,>=3.2 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/87/16/4d247e27c55a7b6412e7c4c86f2500ae61afcbf5932b9e3491f8462f8d9e/nltk-3.4.4.zip
Collecting spacy<2.2,>=2.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/e4/8a/1f1893b12cd63e0933172feb475c485ebeed1e9e6e3ba0147ac716ac3822/spacy-2.1.4-cp37-cp37m-win_amd64.whl
Collecting sqlalchemy<1.3,>=1.2 (from chatterbot)
Collecting mathparse<0.2,>=0.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/c3/e5/4910fb85950cb960fcf3f5aabe1c8e55f5c9201788a1c1302b570a7e1f84/mathparse-0.1.2-py3-none-any.whl
Collecting pint>=0.8.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/15/9d/bf177ebbc57d25e9e296addc14a1303d1e34d7964af5df428a8332349c42/Pint-0.9-py2.py3-none-any.whl
Collecting pytz (from chatterbot)
Using cached https://files.pythonhosted.org/packages/3d/73/fe30c2daaaa0713420d0382b16fbb761409f532c56bdcc514bf7b6262bb6/pytz-2019.1-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in c:\users\sungm\appdata\roaming\python\python37\site-packages (from python-dateutil<2.8,>=2.7->chatterbot) (1.12.0)
Collecting wasabi<1.1.0,>=0.2.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/f4/c1/d76ccdd12c716be79162d934fe7de4ac8a318b9302864716dde940641a79/wasabi-0.2.2-py3-none-any.whl
Collecting blis<0.3.0,>=0.2.2 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/5e/94/9da0eff97411b3e85933e8b955d2ffd353f97b65372a2861e57d59d9ad5d/blis-0.2.4-cp37-cp37m-win_amd64.whl
Collecting plac<1.0.0,>=0.9.6 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/9e/9b/62c60d2f5bc135d2aa1d8c8a86aaf84edb719a59c7f11a4316259e61a298/plac-0.9.6-py2.py3-none-any.whl
Collecting srsly<1.1.0,>=0.0.5 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/21/89/89033beed5e5c5216a6c2c057244bd81944a054e251ef2330ddcde8e13ac/srsly-0.0.7-cp37-cp37m-win_amd64.whl
Collecting numpy>=1.15.0 (from spacy<2.2,>=2.1->chatterbot)
Downloading https://files.pythonhosted.org/packages/ce/61/be72eee50f042db3acf0b1fb86650ad36d6c0d9be9fc29f8505d3b9d6baa/numpy-1.16.4-cp37-cp37m-win_amd64.whl (11.9MB)
|████████████████████████████████| 11.9MB 1.7MB/s
Collecting requests<3.0.0,>=2.13.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting cymem<2.1.0,>=2.0.2 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/73/26/fb9d708e2570bb48f35ce8b6f796ece9b0805191eb11545697a4e9fe06bc/cymem-2.0.2-cp37-cp37m-win_amd64.whl
Collecting thinc<7.1.0,>=7.0.2 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/0c/db/0a4ee9061a803f554449c71dce074d5946e8ed1da847a638fbd9a2923a39/thinc-7.0.4-cp37-cp37m-win_amd64.whl
Collecting jsonschema<3.1.0,>=2.6.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/aa/69/df679dfbdd051568b53c38ec8152a3ab6bc533434fc7ed11ab034bf5e82f/jsonschema-3.0.1-py2.py3-none-any.whl
Collecting murmurhash<1.1.0,>=0.28.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/4f/7b/d77bc9bb101e113884b2d70a118e7ec8dcc9846a35a0e10d47ca37acdcbf/murmurhash-1.0.2-cp37-cp37m-win_amd64.whl
Collecting preshed<2.1.0,>=2.0.1 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/b8/e3/0ec374ed2b5046073e735b6e349d759e795fc2e3c83306fbef88efa01921/preshed-2.0.1-cp37-cp37m-win_amd64.whl
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Collecting tqdm<5.0.0,>=4.10.0 (from thinc<7.1.0,>=7.0.2->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/9f/3d/7a6b68b631d2ab54975f3a4863f3c4e9b26445353264ef01f465dc9b0208/tqdm-4.32.2-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from jsonschema<3.1.0,>=2.6.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in c:\users\sungm\appdata\local\programs\python\python37\lib\site-packages (from jsonschema<3.1.0,>=2.6.0->spacy<2.2,>=2.1->chatterbot) (40.8.0)
Collecting pyrsistent>=0.14.0 (from jsonschema<3.1.0,>=2.6.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/6c/ef/7781092174a42d0b57fb02a2eb23f78ebc8e588c9bd7455e1d1c7b1ea516/pyrsistent-0.15.3.tar.gz
Installing collected packages: pymongo, python-dateutil, pyyaml, nltk, wasabi, numpy, blis, plac, srsly, certifi, chardet, idna, urllib3, requests, cymem, tqdm, preshed, murmurhash, thinc, attrs, pyrsistent, jsonschema, spacy, sqlalchemy, mathparse, pint, pytz, chatterbot
Running setup.py install for nltk ... done
Running setup.py install for pyrsistent ... done
Successfully installed attrs-19.1.0 blis-0.2.4 certifi-2019.6.16 chardet-3.0.4 chatterbot-1.0.5 cymem-2.0.2 idna-2.8 jsonschema-3.0.1 mathparse-0.1.2 murmurhash-1.0.2 nltk-3.4.4 numpy-1.16.4 pint-0.9 plac-0.9.6 preshed-2.0.1 pymongo-3.8.0 pyrsistent-0.15.3 python-dateutil-2.7.5 pytz-2019.1 pyyaml-5.1.1 requests-2.22.0 spacy-2.1.4 sqlalchemy-1.2.19 srsly-0.0.7 thinc-7.0.4 tqdm-4.32.2 urllib3-1.25.3 wasabi-0.2.2
PS C:\work\python\test>
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\AppData\Local\Programs\Python\Python37\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '58559' 'c:\work\python\test\chatbot.py'
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\work\python\test\chatbot.py", line 1, in <module>
from chatterbot import ChatBot
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\__init__.py", line 4, in <module>
from .chatterbot import ChatBot
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
from chatterbot.storage import StorageAdapter
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
from chatterbot.storage.storage_adapter import StorageAdapter
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
from chatterbot.tagging import PosHypernymTagger
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
from chatterbot.tokenizers import get_sentence_tokenizer
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
from chatterbot.corpus import load_corpus, list_corpus_files
from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'
PS C:\work\python> pip install chatterbot_corpus
Collecting chatterbot_corpus Using cached https://files.pythonhosted.org/packages/ed/19/f8b41daf36fe4b0f43e283a820362ffdb2c1128600ab4ee187e84262fa4d/chatterbot_corpus-1.2.0-py2.py3-none-any.whlCollecting PyYAML<4.0,>=3.12 (from chatterbot_corpus)
Using cached https://files.pythonhosted.org/packages/bf/96/d02ef8e1f3073e07ffdc240444e5041f403f29c0775f9f1653f18221082f/PyYAML-3.13-cp37-cp37m-win_amd64.whlERROR: chatterbot 1.0.5 has requirement pyyaml<5.2,>=5.1, but you'll have pyyaml 3.13 which is incompatible.
Installing collected packages: PyYAML, chatterbot-corpus
Found existing installation: PyYAML 5.1.1
Uninstalling PyYAML-5.1.1:
Successfully uninstalled PyYAML-5.1.1
Successfully installed PyYAML-3.13 chatterbot-corpus-1.2.0
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\AppData\Local\Programs\Python\Python37\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '58605' 'c:\work\python\test\chatbot.py'
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\work\python\test\chatbot.py", line 7, in <module>
'import_path': 'adapter.WeatherLogicAdapter'
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\chatterbot.py", line 37, in __init__
utils.validate_adapter_class(adapter, LogicAdapter)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\utils.py", line 78, in validate_adapter_class
if not issubclass(import_module(validate_class), adapter_class):
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\utils.py", line 16, in import_module
module = importlib.import_module(module_path)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\work\python\test\adapter.py", line 35
longitude = 127.070'
^
SyntaxError: EOL while scanning string literal
PS C:\work\python>
ModuleNotFoundError: No module named 'chatterbot_corpus' error가 발생할 경우의 대처
1. 환경준비
Centos 7.x
Anaconda Python 3.7 version
2. 에러 화면
PS C:\work\python\test> pip install -U PyYAMLCollecting PyYAML
Using cached https://files.pythonhosted.org/packages/f5/93/b5ebdabc7e450418c26a1395d995d878a59bc4272d6ac63d2ada922126ad/PyYAML-5.1.1-cp37-cp37m-win_amd64.whl
Installing collected packages: PyYAML
Found existing installation: PyYAML 5.1
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 partial uninstall.
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '61984' 'c:\work\python\test\chatbot.py'
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 85, in _run_code
File "c:\work\python\test\chatbot.py", line 1, in <module>
from chatterbot import ChatBot
from .chatterbot import ChatBot
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
from chatterbot.storage import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
from chatterbot.storage.storage_adapter import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
from chatterbot.tagging import PosHypernymTagger
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
from chatterbot.tokenizers import get_sentence_tokenizer
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
from chatterbot.corpus import load_corpus, list_corpus_files
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\corpus.py", line 5, in <module>
from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'
PS C:\work\python> conda activate base
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '61984' 'c:\work\python\test\chatbot.py'E00002.078: Exception escaped from start_client
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\log.py", line 110, in g
return f(*args, **kwargs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\pydevd_hooks.py", line 74, in start_client
sock, start_session = daemon.start_client((host, port))
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\daemon.py", line 217, in start_client
connect(client, addr)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\socket.py", line 197, in connect
sock.connect(addr)
ConnectionRefusedError: [WinError 10061] 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\Anaconda3\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '62153' 'c:\work\python\test\chatbot.py'Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\Anaconda3\lib\runpy.py", line 85, in _run_code
File "c:\work\python\test\chatbot.py", line 1, in <module>
from chatterbot import ChatBot
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\__init__.py", line 4, in <module>
from .chatterbot import ChatBot
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
from chatterbot.storage import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
from chatterbot.storage.storage_adapter import StorageAdapter
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
from chatterbot.tagging import PosHypernymTagger
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
from chatterbot.tokenizers import get_sentence_tokenizer
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
from chatterbot.corpus import load_corpus, list_corpus_files
File "C:\Users\sungm\Anaconda3\lib\site-packages\chatterbot\corpus.py", line 5, in <module>
from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'
3. 해결
WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3. Update or remove conda-build to get smaller downloads and faster extractions.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\sungm\Anaconda3
added / updated specs:
- pyyaml
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2019.1.23 | 0 158 KB anaconda
certifi-2019.3.9 | py37_0 155 KB anaconda
conda-4.7.5 | py37_0 3.0 MB anaconda
openssl-1.1.1b | he774522_1 5.7 MB anaconda
pyyaml-5.1 | py37he774522_0 162 KB anaconda
------------------------------------------------------------
Total: 9.2 MB
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates pkgs/main --> anaconda
certifi pkgs/main --> anaconda
conda pkgs/main --> anaconda
openssl pkgs/main --> anaconda
pyyaml pkgs/main --> anaconda
Proceed ([y]/n)? y
Downloading and Extracting Packages
conda-4.7.5 | 3.0 MB | ##################################################################################################### | 100%
pyyaml-5.1 | 162 KB | ##################################################################################################### | 100%
certifi-2019.3.9 | 155 KB | ##################################################################################################### | 100%
openssl-1.1.1b | 5.7 MB | ##################################################################################################### | 100%
ca-certificates-2019 | 158 KB | ##################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
PS C:\work\python>
계속 실패...
4. 마지막...
python 3.7.3 x64 버전 설치
Collecting chatterbot
Using cached https://files.pythonhosted.org/packages/6c/0e/dac0d82f34f86bf509cf5ef3e2dfc5aa7d444bd843a2330ceb7d854f84f2/ChatterBot-1.0.5-py2.py3-none-any.whl
Collecting pymongo<4.0,>=3.3 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/57/b0/acf286a558e19dc0992354181c8650dffc79fced47a4555e49ca70acf426/pymongo-3.8.0-cp37-cp37m-win_amd64.whl
Collecting python-dateutil<2.8,>=2.7 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl
Collecting pyyaml<5.2,>=5.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/f5/93/b5ebdabc7e450418c26a1395d995d878a59bc4272d6ac63d2ada922126ad/PyYAML-5.1.1-cp37-cp37m-win_amd64.whl
Collecting nltk<4.0,>=3.2 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/87/16/4d247e27c55a7b6412e7c4c86f2500ae61afcbf5932b9e3491f8462f8d9e/nltk-3.4.4.zip
Collecting spacy<2.2,>=2.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/e4/8a/1f1893b12cd63e0933172feb475c485ebeed1e9e6e3ba0147ac716ac3822/spacy-2.1.4-cp37-cp37m-win_amd64.whl
Collecting sqlalchemy<1.3,>=1.2 (from chatterbot)
Collecting mathparse<0.2,>=0.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/c3/e5/4910fb85950cb960fcf3f5aabe1c8e55f5c9201788a1c1302b570a7e1f84/mathparse-0.1.2-py3-none-any.whl
Collecting pint>=0.8.1 (from chatterbot)
Using cached https://files.pythonhosted.org/packages/15/9d/bf177ebbc57d25e9e296addc14a1303d1e34d7964af5df428a8332349c42/Pint-0.9-py2.py3-none-any.whl
Collecting pytz (from chatterbot)
Using cached https://files.pythonhosted.org/packages/3d/73/fe30c2daaaa0713420d0382b16fbb761409f532c56bdcc514bf7b6262bb6/pytz-2019.1-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in c:\users\sungm\appdata\roaming\python\python37\site-packages (from python-dateutil<2.8,>=2.7->chatterbot) (1.12.0)
Collecting wasabi<1.1.0,>=0.2.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/f4/c1/d76ccdd12c716be79162d934fe7de4ac8a318b9302864716dde940641a79/wasabi-0.2.2-py3-none-any.whl
Collecting blis<0.3.0,>=0.2.2 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/5e/94/9da0eff97411b3e85933e8b955d2ffd353f97b65372a2861e57d59d9ad5d/blis-0.2.4-cp37-cp37m-win_amd64.whl
Collecting plac<1.0.0,>=0.9.6 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/9e/9b/62c60d2f5bc135d2aa1d8c8a86aaf84edb719a59c7f11a4316259e61a298/plac-0.9.6-py2.py3-none-any.whl
Collecting srsly<1.1.0,>=0.0.5 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/21/89/89033beed5e5c5216a6c2c057244bd81944a054e251ef2330ddcde8e13ac/srsly-0.0.7-cp37-cp37m-win_amd64.whl
Collecting numpy>=1.15.0 (from spacy<2.2,>=2.1->chatterbot)
Downloading https://files.pythonhosted.org/packages/ce/61/be72eee50f042db3acf0b1fb86650ad36d6c0d9be9fc29f8505d3b9d6baa/numpy-1.16.4-cp37-cp37m-win_amd64.whl (11.9MB)
|████████████████████████████████| 11.9MB 1.7MB/s
Collecting requests<3.0.0,>=2.13.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting cymem<2.1.0,>=2.0.2 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/73/26/fb9d708e2570bb48f35ce8b6f796ece9b0805191eb11545697a4e9fe06bc/cymem-2.0.2-cp37-cp37m-win_amd64.whl
Collecting thinc<7.1.0,>=7.0.2 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/0c/db/0a4ee9061a803f554449c71dce074d5946e8ed1da847a638fbd9a2923a39/thinc-7.0.4-cp37-cp37m-win_amd64.whl
Collecting jsonschema<3.1.0,>=2.6.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/aa/69/df679dfbdd051568b53c38ec8152a3ab6bc533434fc7ed11ab034bf5e82f/jsonschema-3.0.1-py2.py3-none-any.whl
Collecting murmurhash<1.1.0,>=0.28.0 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/4f/7b/d77bc9bb101e113884b2d70a118e7ec8dcc9846a35a0e10d47ca37acdcbf/murmurhash-1.0.2-cp37-cp37m-win_amd64.whl
Collecting preshed<2.1.0,>=2.0.1 (from spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/b8/e3/0ec374ed2b5046073e735b6e349d759e795fc2e3c83306fbef88efa01921/preshed-2.0.1-cp37-cp37m-win_amd64.whl
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests<3.0.0,>=2.13.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Collecting tqdm<5.0.0,>=4.10.0 (from thinc<7.1.0,>=7.0.2->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/9f/3d/7a6b68b631d2ab54975f3a4863f3c4e9b26445353264ef01f465dc9b0208/tqdm-4.32.2-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from jsonschema<3.1.0,>=2.6.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in c:\users\sungm\appdata\local\programs\python\python37\lib\site-packages (from jsonschema<3.1.0,>=2.6.0->spacy<2.2,>=2.1->chatterbot) (40.8.0)
Collecting pyrsistent>=0.14.0 (from jsonschema<3.1.0,>=2.6.0->spacy<2.2,>=2.1->chatterbot)
Using cached https://files.pythonhosted.org/packages/6c/ef/7781092174a42d0b57fb02a2eb23f78ebc8e588c9bd7455e1d1c7b1ea516/pyrsistent-0.15.3.tar.gz
Installing collected packages: pymongo, python-dateutil, pyyaml, nltk, wasabi, numpy, blis, plac, srsly, certifi, chardet, idna, urllib3, requests, cymem, tqdm, preshed, murmurhash, thinc, attrs, pyrsistent, jsonschema, spacy, sqlalchemy, mathparse, pint, pytz, chatterbot
Running setup.py install for nltk ... done
Running setup.py install for pyrsistent ... done
Successfully installed attrs-19.1.0 blis-0.2.4 certifi-2019.6.16 chardet-3.0.4 chatterbot-1.0.5 cymem-2.0.2 idna-2.8 jsonschema-3.0.1 mathparse-0.1.2 murmurhash-1.0.2 nltk-3.4.4 numpy-1.16.4 pint-0.9 plac-0.9.6 preshed-2.0.1 pymongo-3.8.0 pyrsistent-0.15.3 python-dateutil-2.7.5 pytz-2019.1 pyyaml-5.1.1 requests-2.22.0 spacy-2.1.4 sqlalchemy-1.2.19 srsly-0.0.7 thinc-7.0.4 tqdm-4.32.2 urllib3-1.25.3 wasabi-0.2.2
PS C:\work\python\test>
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\AppData\Local\Programs\Python\Python37\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '58559' 'c:\work\python\test\chatbot.py'
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\work\python\test\chatbot.py", line 1, in <module>
from chatterbot import ChatBot
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\__init__.py", line 4, in <module>
from .chatterbot import ChatBot
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\chatterbot.py", line 2, in <module>
from chatterbot.storage import StorageAdapter
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\storage\__init__.py", line 1, in <module>
from chatterbot.storage.storage_adapter import StorageAdapter
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\storage\storage_adapter.py", line 3, in <module>
from chatterbot.tagging import PosHypernymTagger
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tagging.py", line 4, in <module>
from chatterbot.tokenizers import get_sentence_tokenizer
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\tokenizers.py", line 4, in <module>
from chatterbot.corpus import load_corpus, list_corpus_files
from chatterbot_corpus.corpus import DATA_DIRECTORY
ModuleNotFoundError: No module named 'chatterbot_corpus'
PS C:\work\python> pip install chatterbot_corpus
Collecting chatterbot_corpus Using cached https://files.pythonhosted.org/packages/ed/19/f8b41daf36fe4b0f43e283a820362ffdb2c1128600ab4ee187e84262fa4d/chatterbot_corpus-1.2.0-py2.py3-none-any.whlCollecting PyYAML<4.0,>=3.12 (from chatterbot_corpus)
Using cached https://files.pythonhosted.org/packages/bf/96/d02ef8e1f3073e07ffdc240444e5041f403f29c0775f9f1653f18221082f/PyYAML-3.13-cp37-cp37m-win_amd64.whlERROR: chatterbot 1.0.5 has requirement pyyaml<5.2,>=5.1, but you'll have pyyaml 3.13 which is incompatible.
Installing collected packages: PyYAML, chatterbot-corpus
Found existing installation: PyYAML 5.1.1
Uninstalling PyYAML-5.1.1:
Successfully uninstalled PyYAML-5.1.1
Successfully installed PyYAML-3.13 chatterbot-corpus-1.2.0
PS C:\work\python> cd 'c:\work\python'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\sungm\AppData\Local\Programs\Python\Python37\python.exe' 'c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '58605' 'c:\work\python\test\chatbot.py'
Traceback (most recent call last):
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 434, in main
run()
File "c:\Users\sungm\.vscode\extensions\ms-python.python-2019.6.24221\pythonFiles\lib\python\ptvsd\__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\work\python\test\chatbot.py", line 7, in <module>
'import_path': 'adapter.WeatherLogicAdapter'
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\chatterbot.py", line 37, in __init__
utils.validate_adapter_class(adapter, LogicAdapter)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\utils.py", line 78, in validate_adapter_class
if not issubclass(import_module(validate_class), adapter_class):
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\site-packages\chatterbot\utils.py", line 16, in import_module
module = importlib.import_module(module_path)
File "C:\Users\sungm\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\work\python\test\adapter.py", line 35
longitude = 127.070'
^
SyntaxError: EOL while scanning string literal
PS C:\work\python>
I always like and search such topics and everything connected to them.Excellent and very cool idea and the subject at the top of magnificence and I am happy to comment on this topic through which we address the idea of positive reaction.
답글삭제Chatbot Company in Dubai
Chatbot Companies in Dubai
Chatbot Development
AI Chatbot Development
Chatbot Companies in UAE
Chatbot Company in Chennai
Chatbot Company in Mumbai
Chatbot Company in Delhi
Chatbot Development Companies