1、报错:
no module named ‘spacy’
解决办法:
执行
pip install spacy
2、报错:
OSError: [E050] Can’t find model ‘en’. It doesn’t seem to be a shortcut link, a
Python package or a valid path to a data directory.
解决办法:
python -m spacy download en
3、报错:
requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetErro
r(10054, ‘远程主机强迫关闭了一个现有的连接。’, None, 10054, None))
解决办法:
4、报错:
OSError: [E941] Can’t find model ‘en’. It looks like you’re trying to load a model from a shortcut, which is deprecated as of spaCy v3.0. To load the model, use its full name instead:
nlp = spacy.load(“en_core_web_sm”)
For more details on the available models, see the models directory: https://spacy.io/models. If you want to create a blank model, use spacy.blank: nlp = spacy.blank(“en”)
解决办法:
python -m spacy download en
5、报错:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘raw.githubusercontent.com’, port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x0000000014121E88>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’))
解决办法1(如下,但之后依然报错):
下载en_core_web_sm离线包
https://blog.csdn.net/hjzgj263446/article/details/103527952
下载后安装:
pip install /文件路径/en_core_web_sm-2.2.5.tar.gz
依然报错。
解决办法2:
pip install appium-python-client 3