无法导入en_core_web_sm或Spacy [英] Not able to import en_core_web_sm or Spacy

查看:1571
本文介绍了无法导入en_core_web_sm或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

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆