Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [E050] Can't find model 'de_core_news_sm'. It doesn't seem to be a Python package or a valid path to a data directory. #57

Closed
gemfield opened this issue Jul 30, 2021 · 1 comment

Comments

@gemfield
Copy link
Contributor

环境:MLab HomePod 2.0 pro
错误:

root@homepod:~# python demo.py 
Traceback (most recent call last):
  File "demo.py", line 13, in <module>
    token_transform[SRC_LANGUAGE] = get_tokenizer('spacy', language='de_core_news_sm')
  File "/opt/conda/lib/python3.8/site-packages/torchtext/data/utils.py", line 115, in get_tokenizer
    spacy = spacy.load(language)
  File "/opt/conda/lib/python3.8/site-packages/spacy/__init__.py", line 51, in load
    return util.load_model(
  File "/opt/conda/lib/python3.8/site-packages/spacy/util.py", line 331, in load_model
    raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'de_core_news_sm'. It doesn't seem to be a Python package or a valid path to a data directory.
@gemfield
Copy link
Contributor Author

解决方案:下载相应的包。

python -m spacy download en_core_web_sm
python -m spacy download de_core_news_sm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant