-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip
reports conflict between identical versions of the same package when installed both as editable package and and dependency of an editable package
#12533
Comments
pip
report conflict between identical version of the same package when installed both as editable package and and depedency of an editable packagepip
report conflicts between identical versions of the same package when installed both as editable package and and dependency of an editable package
pip
report conflicts between identical versions of the same package when installed both as editable package and and dependency of an editable packagepip
reports conflict between identical versions of the same package when installed both as editable package and and dependency of an editable package
(This may be a duplicate of #10216) |
The problem is that if we were to install In general, you shouldn't depend on code at a "changeable" URL like a git branch head, but you should rather depend on a specific commit. That avoids your dependencies breaking unexpectedly. It's hard to say more with only an artificial example to go on. But the basic answer is that "you shouldn't be doing this". Either you should be avoiding dependencies on URLs that don't point to a fixed commit, or you shouldn't be using editable installs. Making this "work" (in some sense) would be a rather significant change to how pip models dependencies, and I don't think it's something we'd want to do just to support a usage which is at best questionable. |
I agree - but isn't that the point of editable install from Git?
Point taken, but the URL being "changeable" is not the issue here, I believe. I can reproduce the same behavior with more specific URLs:
[project]
name = "Bug"
version = "0"
dependencies = [
"humanize @ git+https://github.com/python-humanize/humanize@b1e5d43c6fd44dbaf0ad86339f63bfa04982d707#egg=humanize",
] and
Accepted. In that case, I think the error message might use improvements.
(I am not sure that argument still hold in light of commit-based URLs.) But again, if |
Sure. In which case, a PR would be welcomed. |
One more comment now that I have read #10216 (comment), where you wrote "two repositories": my expectation was that |
(And I think #11899 would give me exactly that.) |
Yeah, there's a lot of weird interactions here between different features that were never really intended to be used together. If we had a clean slate, a lot of these things would simply never have been allowed - but it's too late for that now as people are using them, and we have to do the best we can to find sane and maintainable solutions... |
Description
Sorry, I cannot do it more concisely than in the title :)
Expected behavior
Installation succeeds without error
pip
does not seem to understand that the two instances of "humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize)" refer to exactly the same package.pip version
24.0
Python version
3.12.2
OS
Windows 11 23H2
How to Reproduce
pyproject.toml
Then run
Output
INFO: pip is looking at multiple versions of bug to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install bug==0 and humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize) because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize)
bug 0 depends on humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize)
To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Code of Conduct
The text was updated successfully, but these errors were encountered: