LinuxCommandLibrary

poetry-install

Install project dependencies from lock file

TLDR

Install all dependencies

$ poetry install
copy
Install without dev dependencies
$ poetry install --without dev
copy
Install only specific groups
$ poetry install --only main,test
copy
Install with extras
$ poetry install --extras "[extra1 extra2]"
copy
Sync environment exactly
$ poetry install --sync
copy

SYNOPSIS

poetry install [options]

DESCRIPTION

poetry install reads pyproject.toml and poetry.lock to install project dependencies. It creates a virtual environment if needed and ensures reproducible installations.

PARAMETERS

--without groups

Exclude dependency groups.
--only groups
Install only these groups.
--extras, -E extras
Install extras.
--sync
Sync environment (remove unlisted).
--no-root
Don't install project itself.
--dry-run
Show what would be installed.
-v, -vv, -vvv
Verbosity levels.

EXAMPLES

$ # Install everything
poetry install

# Production only
poetry install --without dev,test

# Only dev dependencies
poetry install --only dev

# Don't install the project itself
poetry install --no-root

# Synchronize (remove extras)
poetry install --sync

# Dry run
poetry install --dry-run
copy

LOCK FILE

- poetry.lock ensures reproducible installs
- Generated on first install
- Updated by poetry lock or poetry update

CAVEATS

Requires pyproject.toml. Creates virtual environment by default. Use --sync to match lock exactly.

HISTORY

poetry install is part of Poetry by Sébastien Eustace, providing deterministic Python dependency installation.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community