Skip to content

Improve documentation on the behaviour of update and install #4117

Closed

Description

@chernals

I believe that the documentation could be improved regarding what update and install are doing.

To me it is not really clear, for example:

  • when doing update are the new packages installed? is the pyproject.toml file update with latest version numbers?
  • when should one do install ? Only the first time?

Maybe we could collect here answers to questions like the two above and I'll be happy to make a PR for the doc.

Activity

  1. added
    area/docs
    status/triage
    on May 30, 2021
  2. finswimmer commented on May 30, 2021

    @finswimmer
    Member

    The purpose of poetry install is to:

    • create a venv if None exists
    • resolve dependency and write the exact version to poetry.lock if None exists
    • install the locked dependencies in the venv
    • install the current project in editable mode

    A poetry install is only necessary if you:

    • create the venv the first time
    • change any metadata of the project, like version number
    • add "scripts" entry points to the pyproject.toml

    The purpose of poetry update is to:

    • update all dependencies to the current version within in the pyproject.toml specified version range
    • write the updated version to poetry.lock
    • the version numbers in pyproject.toml remain untouched
  3. chernals commented on May 30, 2021

    @chernals
    Author

    Thanks !

    How does poetry update behave when "extra" dependencies are declared or with respect to development dependencies? Does it follow what poetry install did when last executed? (for example if poetry install --no-dev then poetry update will not touch the developement dependencies, if poetry install (without -E foo0 then poetry update will not touch the foo extra dependencies?

  4. mrkeuz commented on Jun 11, 2022

    @mrkeuz

    Same issue with poetry install . Always confused with this command help.

    Help also should explain:

    • where dependencies will be installed - exactly into virtual environment (even poetry shell virtual env not activated). Not to system python dependencies. Even poetry shell / virtual env not activated. While virtualenvs.create = true

    I understand now that it assumed and expected but not clear from docs. At first, I have trying to install packages into system via poetry install. Exactly because not well documented.

  5. rafrafek commented on Oct 13, 2022

    @rafrafek
    Contributor

    Are dev (or other groups) dependencies installed by default?

  6. neersighted commented on Oct 13, 2022

    @neersighted
    Member

    Are dev (or other groups) dependencies installed by default?

    The best intro to the feature is the release announcement which goes into detail with examples. Yes, they are installed by default using Poetry (but not captured by tools that build/install as a Python package).

  7. rafrafek commented on Oct 13, 2022

    @rafrafek
    Contributor

    Yes, they are installed by default using Poetry (but not captured by tools that build/install as a Python package).

    Can we add this information to the docs here: https://python-poetry.org/docs/cli/#install

  8. neersighted commented on Oct 13, 2022

    @neersighted
    Member

    PRs welcome :)

  9. added and removed
    status/triage
    on Oct 29, 2024
  10. abdullahmujahidali commented on Feb 1, 2026

    @abdullahmujahidali
    Contributor

    Hi, I'd like to work on this. I'll improve the documentation for install and update commands to clarify:

    • What each command does
    • When to use each one
    • Whether update installs new packages
    • Whether pyproject.toml gets updated

    Will submit a PR soon.

  11. github-actions commented on Mar 17, 2026

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  12. locked as resolved and limited conversation to collaborators on Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docsgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions