← 返回命令列表

Linux command

poetry-install 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install all dependencies

poetry install

Install without dev dependencies

poetry install --without dev

Install only specific groups

poetry install --only main,test

Install with extras

poetry install --extras "[extra1 extra2]"

Sync environment exactly

poetry install --sync

说明

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

参数

--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.

FAQ

What is the poetry-install command used for?

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

How do I run a basic poetry-install example?

Run `poetry install` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --without _groups_ do in poetry-install?

Exclude dependency groups.