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 tries to (re-)install package although same version is available in site-packages #7234

Closed
marekro opened this issue Dec 22, 2022 · 3 comments
Labels
status/duplicate Duplicate issues

Comments

@marekro
Copy link

marekro commented Dec 22, 2022

I am using a system-wide Python 3.10 installation with up-to-date pip, setuptools and poetry, which also includes a few packages that require binaries being built during installation, example: netifaces. Version 0.11.0 is installed in /opt/python-3.10.9/lib/python3.10/site-packages/
I have a poetry.toml with:

[virtualenvs.options]
system-site-packages = true

Now when running "poetry install" (poetry version 1.3.1), I see this message:

Updating netifaces (0.11.0 /opt/python-3.10.9/lib/python3.10/site-packages -> 0.11.0): Installing...

This should not happen - why update the same version? In my case, this even fails fatally, because the environment (a Docker container) does not have a working gcc.
My expectation is that poetry will recognise the package version available in site-packages (as configured in poetry.toml) and skip any attempt to install the same version in the virtual env.

@neersighted
Copy link
Member

This is not, in fact, the same version -- there is a direct_url.json marker in that distribution that marks it as installed from a path and not an index. The path in the version number indicates this.

Additionally, please follow the issue template and the contribution guide when reporting issues in the future -- it really helps us address your issues faster.

@neersighted neersighted added the kind/question User questions (candidates for conversion to discussion) label Dec 22, 2022
@radoering
Copy link
Member

Might also be a duplicate of #6035 (and a bug, see #6035 (comment))

@neersighted neersighted added status/duplicate Duplicate issues and removed kind/question User questions (candidates for conversion to discussion) labels Dec 23, 2022
@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2022
Copy link

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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants