安装chatterbot时遇到的问题

\问题1:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lspenkx4/unroll/

解决:

pip install --upgrade setuptools

python -m pip install --upgrade pip

问题2:

OSError: [E941] Can't find model 'en'. It looks like you're trying to load a model from a shortcut, which is obsolete as of spaCy v3.0. To load the model, use its full name instead:

解决:

安装依赖:

python -m spacy download en_core_web_sm

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chatterbot中的tagging.py文件,修改line13为:

修改源码为:

   if self.language.ISO_639_1.lower() == 'en':
       self.nlp = spacy.load('en_core_web_sm')
   else:
       self.nlp = spacy.load(self.language.ISO_639_1.lower())

问题3:

gcc: 致命错误:cannot execute ‘cc1plus’: execvp: 没有那个文件或目录

解决:

yum install gcc-c++

你可能感兴趣的:(python,linux,开发语言)