无法导入en_core_web_sm或Spacy [英] Not able to import en_core_web_sm or Spacy
问题描述
我正在尝试将en_core_web_sm
作为独立程序包导入,并且也尝试通过spacy
.但是在两种情况下我都在ujson模块中遇到错误.
I am trying to import en_core_web_sm
as independent package and also tried through spacy
. But I am getting an error in ujson module in both case.
错误:
ModuleNotFoundError: No module named 'srsly.ujson.ujson'
ModuleNotFoundError: No module named 'srsly.ujson.ujson'
我通过以下命令安装了en_core_web_sm
I installed en_core_web_sm
through following command
python -m spacy download en_core_web_sm
按Spacy
文档进行操作即可.但事实并非如此.我要导入en_core_web_sm
.
Going by Spacy
documentation it shall work. But it is not. I want to import en_core_web_sm
.
推荐答案
srsly
listed as a dependency so it should be installed. If it's not installed just install it yourself:
python -m pip install srsly
这篇关于无法导入en_core_web_sm或Spacy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!