Search code examples
python-3.xpippython-poetry

Install part of a pypi library with poetry


Does anyone know if I can install a python library's submodule with poetry? I can install with pip

pip install library_a[sub_library]

How can I do this in poetry?


Solution

  • To do that in poetry you can use

    poetry add "library_a[sub_library]"

    Make sure to add the quote " to make it work.