Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
jstriebel opened this issue Jan 14, 2020 · 4 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@jstriebel
Copy link
Contributor

  • 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:  …
@jstriebel
Copy link
Contributor Author

Just tested this with poetry 1.0.5 and reproduced this issue.

@jstriebel
Copy link
Contributor Author

jstriebel commented Jul 23, 2020

Tested it again with poetry 1.0.10 and could reproduce this issue, however this seems to be fixed on the develop branch / 1.1.0a3, it works for site-packages and dist-packages there.

If anybody else needs poetry to install packages once for site-packages and dist-packages (see #1711) with the current versions, we are using a specific poetry version for both cases:

# just using setuptools since that's installed almost everywhere
PACKAGE_LOCATION=$(pip show setuptools | grep Location | tail -c 14)
if [[ "$PACKAGE_LOCATION" == "dist-packages" ]]; then
    pip install poetry==1.0.5  # or sth. newer
else
    pip install poetry==1.0.0
fi

@jstriebel
Copy link
Contributor Author

This is fixed with poetry 1.1.0, thanks!

Copy link

github-actions bot commented Mar 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant