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

Inconsistency with pip when handling versions with "+" in their name. #2791

Closed
pkubik opened this issue Aug 10, 2020 · 4 comments
Closed

Inconsistency with pip when handling versions with "+" in their name. #2791

pkubik opened this issue Aug 10, 2020 · 4 comments
Labels
kind/bug Something isn't working as expected

Comments

@pkubik
Copy link

pkubik commented Aug 10, 2020

  • OS version and name: Ubuntu 18.04
  • Poetry version: 1.0.10

Deps:

torch = "^1.6"
kornia = "^0.4"

Issue

The default behavior is correct. Even if I remove torch dependency it is being installed as a dependency for kornia.

Yet for my server machine I need to use a specific manually installed version of torch which is 1.6.0+cu101. This dependency is already installed on the system and should be reused. pip install properly recognize that the existing version 1.6.0+cu101 matches the requirement ^1.6, but Poetry tries to "upgrade" the package and thus replaces it with a version that does not work in my setup:

- Updating torch (1.6.0+cu101 -> 1.6.0)

Not that I've added kornia library because it depend on torch 1.6. Otherwise I could just remove torch from my requirements and move on with my life. Also note that this specific 1.6.0+cu101 version is not available on PyPI, so I can't simply provide this version in my TOML - besides I wouldn't like to hardcore a version that is needed only by some of my environments.

Edit:
Handling this +something suffixes is backed by PEP-440
https://www.python.org/dev/peps/pep-0440/#id25

@pkubik pkubik added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 10, 2020
@abn
Copy link
Member

abn commented Aug 10, 2020

Relates to #2543

@pkubik
Copy link
Author

pkubik commented Aug 10, 2020

@abn, yes, this is a duplicate to #2543. Sorry, I didn't have the right keywords when I was creating this issue.

@pkubik pkubik closed this as completed Aug 10, 2020
@abn
Copy link
Member

abn commented Aug 10, 2020

@pkubik not a problem. Appreciate you raising the issue. :)

@abn abn removed the status/triage This issue needs to be triaged label Sep 25, 2020
Copy link

github-actions bot commented Mar 3, 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 3, 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

2 participants