serhii.net

In the middle of the desert you can say anything you want

17 Dec 2023

Poetry add spacy model to requirements

Usually models are added as python -m spacy download de_core_news_sm

For poetryi: python - How to download spaCy models in a Poetry managed environment - Stack Overflow

TL;DR: spacy models are python packages!

Get direct link to model packages here: uk · Releases · explosion/spacy-models

Add to poetry tool dependencies in pyproject.toml:

[tool.poetry.dependencies]
python = "^3.10"
# ...
uk_core_news_sm = {url = "https://github.com/explosion/spacy-models/releases/download/uk_core_news_sm-3.7.0/uk_core_news_sm-3.7.0-py3-none-any.whl"}

add through poetry CLI:

poetry add https://github.com/explosion/spacy-models/releases/download/uk_core_news_sm-3.7.0/uk_core_news_sm-3.7.0-py3-none-any.whl
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus