diff --git a/docs/docs/basic-usage.md b/docs/docs/basic-usage.md index dad1ef9b9b4..7a8fef02695 100644 --- a/docs/docs/basic-usage.md +++ b/docs/docs/basic-usage.md @@ -134,6 +134,15 @@ the dependencies installed are still working even if your dependencies released For libraries it is not necessary to commit the lock file. +### Installing dependencies only + +The current project is installed in [editable](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs) mode by default. + +If you want to install the dependencies only, run the `install` command with the `--no-root` flag: + +```bash +poetry install --no-root +``` ## Updating dependencies to their latest versions diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py index fabffec4a24..f69e4e5873c 100644 --- a/poetry/console/commands/install.py +++ b/poetry/console/commands/install.py @@ -34,6 +34,12 @@ class InstallCommand(EnvCommand): exist it will look for pyproject.toml and do the same. poetry install + +By default, the above command will also install the current project. To install only the +dependencies and not including the current project, run the command with the +--no-root option like below: + + poetry install --no-root """ _loggers = ["poetry.repositories.pypi_repository"]