Skip to content

Commit 3b9b705

Browse files
authored
move notes a bit down
1 parent 913d9a9 commit 3b9b705

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/cli.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,19 @@ poetry init
475475
The `install` command reads the `pyproject.toml` file from the current project,
476476
resolves the dependencies, and installs them.
477477

478+
```bash
479+
poetry install
480+
```
481+
482+
If there is a `poetry.lock` file in the current directory,
483+
it will use the exact versions from there instead of resolving them.
484+
This ensures that everyone using the library will get the same versions of the dependencies.
485+
486+
If there is no `poetry.lock` file, Poetry will create one after dependency resolution.
487+
478488
{{% note %}}
479489
**When to use `install` vs `update`:**
480-
- Use `poetry install` to install dependencies as specified in `poetry.lock` (or resolve dependencies and create the lock file if it's missing).
490+
- Use `poetry install` to install dependencies as specified in `poetry.lock` (or resolve dependencies and create the lock file if it is missing).
481491
This is what you run after cloning a project. For reproducible installs, prefer `poetry sync`,
482492
which also removes packages that are not in the lock file.
483493
- Use `poetry update` when you want to update dependencies to their latest versions (within the constraints from the `pyproject.toml`)
@@ -492,16 +502,6 @@ system site-packages available in your virtual environment, you should use `poet
492502
because `poetry sync` will normally not work well in these cases.
493503
{{% /note %}}
494504

495-
```bash
496-
poetry install
497-
```
498-
499-
If there is a `poetry.lock` file in the current directory,
500-
it will use the exact versions from there instead of resolving them.
501-
This ensures that everyone using the library will get the same versions of the dependencies.
502-
503-
If there is no `poetry.lock` file, Poetry will create one after dependency resolution.
504-
505505
If you want to exclude one or more dependency groups for the installation, you can use
506506
the `--without` option.
507507

0 commit comments

Comments
 (0)