Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save chongshenng/2d533ee4200dbc2a88e0b2cc6cafe171 to your computer and use it in GitHub Desktop.

Select an option

Save chongshenng/2d533ee4200dbc2a88e0b2cc6cafe171 to your computer and use it in GitHub Desktop.
Install `poetry` groups with `pip`

Sometimes, you need to install poetry groups (for docs, test, or dev) but you want to use pip.

Here's how to do it.

First, install the poetry-plugin (see original link):

$ $POETRY_HOME/bin/pip install --user poetry-plugin

Then, for a group [tool.poetry.group.docs.dependencies], run

$ poetry export -f requirements.txt --without-hashes --only docs -o only-docs.txt
$ pip install -r only-docs.txt

Ref: https://stackoverflow.com/a/77043526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment