pythonnltkpython-poetry

Poetry: how install nltk dependencies


I use poetry as a dependency manager and I need to install nltk dependencies

nltk.download('omw-1.4')

It is possible to add it into pyproject.toml file?


Solution

  • For now, it's not possible to run custom commands defined in pyproject.toml, it's been discussed for a while now though.

    You can however:

    1. Create a python script all call it with poetry run
    2. Use a wrapper like taskipy or poethepoet to call any script/command from your poetry virtualenv