Skip to content

poetry re-installs up-to-date site-packages when virtualenvs.create is false #1882

@jstriebel

Description

@jstriebel
  • I am on the latest Poetry version. (1.0.2 & 1.0.1)

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: CentOS Linux release 7.5.1804

  • Poetry version: 1.0.2

Issue

Since poetry 1.0.1 we experience that already up-to-date site-packages (with the correct versions) are reinstalled by poetry, as it tries to update them, similar to #1711 (there it was about dist-packages). This was still working in poetry 1.0.0. This happens when not using poetry's virtualenv feature (using poetry config virtualenvs.create false), in this case we are using conda to manage the environments.

Here's a part of the poetry install output, when running it the second time:

  - Updating more-itertools (7.2.0 /u/jonathan/conda-envs/segm-3.6/lib/python3.6/site-packages -> 7.2.0)
  - Updating decorator (4.4.1 /u/jonathan/conda-envs/segm-3.6/lib/python3.6/site-packages -> 4.4.1)
  - Updating ipython-genutils (0.2.0 /u/jonathan/conda-envs/segm-3.6/lib/python3.6/site-packages -> 0.2.0)

It seems that site-packages can never match the version, so poetry tries to upgrade them, even when the version actually matches.

Output of poetry debug info:

Poetry
Version: 1.0.1
Python:  3.6.10

Virtualenv
Python:         3.6.10
Implementation: CPython
Path:           …
Valid:          True

System
Platform: linux
OS:       posix
Python:  …

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions