OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a shortcut link, a Python p

在使用spacy进行语义分析时,一直出现加载包不成功的例子
会出现:
在这里插入图片描述

/Users/lxj/venv/bin/python /anaconda3/work_space_tree/ASGCN_master/dependency_graph.py
Traceback (most recent call last):
  File "/anaconda3/work_space_tree/ASGCN_master/dependency_graph.py", line 10, in 
    spacy.load('en_core_web_sm')
  File "/Users/lxj/venv/lib/python3.7/site-packages/spacy/__init__.py", line 30, in load
    return util.load_model(name, **overrides)
  File "/Users/lxj/venv/lib/python3.7/site-packages/spacy/util.py", line 169, in load_model
    raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Process finished with exit code 1
python3 -m spacy download en_core_web_sm

接下来在右上角搜聚焦处输入 “en_core_web_sm”,搜索到下载的包,然后将这个包复制到yun运行的py文件的目录下就可以了。OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a shortcut link, a Python p_第1张图片

你可能感兴趣的:(自然语言处理)