OSError:[E050]找不到模型'fr_core_web_md'。它似乎不是快捷方式链接,Python包或数据目录的有效路径。

时间:2019-03-25 13:31:18

标签: python spacy

我正在从事NLP项目,所以我正在使用spacy,问题是当我create table #temp (mygroup int, var1 int, var2 int) insert into #temp values (1 , 1, null), (1 , 2, 1), (1 , 3, 2), (1 , 4, null), (2 , 23, 23 ), (2 , 24, 20 ), (2 , 26, null), (3 , 30, 10), (3 , 20, null), (3 , 10, null) ;with cte as ( select t.mygroup, t.var1, t2.var2 from #temp t inner join #temp t2 on t2.var2=t.var1 and t2.mygroup = t.mygroup ) select var2 into #notIncludeList from #temp where var2 not in (select var1 from cte) select mygroup from #temp where var2 in (select var2 from #notIncludeList) group by mygroup 时,它对我不起作用,并且出现此错误:

import nlp=spacy.load('fr_core_news_md')

尽管使用OSError: [E050] Can't find model 'fr_core_news_md'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory." 请我帮忙。

1 个答案:

答案 0 :(得分:0)

我遇到了类似的问题,这对我有用:

通过python3 -m spacy download fr_core_news_md下载

import spacy
import fr_core_news_md

nlp = fr_core_news_md.load()