-
Notifications
You must be signed in to change notification settings - Fork 241
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 not accepting locally installed dev version of dependency #505
Comments
So I see we are considering your requested version as not matching:
https://www.python.org/dev/peps/pep-0440/#developmental-releases says |
Yeah you're correct that
Since |
Since there are two different comparison logic (depending whether the package is already installed in the local environment), we may need to add an argument to |
Seems like it, but
... hence we may need a way to be told that a version is installed. 😄 Maybe a keyword-only |
Aye that sounds reasonable to me. |
It seems, that adding only ---if pre is None and post is None and dev is not None:
+++if pre is None and post is None and dev is not None and not installed:
---if dev is None:
+++if installed or dev is None: and ---return Version(prospective.public) >= Version(spec)
+++return Version(prospective.public, installed=prospective.is_installed) >= Version(spec) and |
Versions in and of themselves have no concept of installation; they are basically just a weird number. So I would rather not change the constructor of |
Note
The rest of this issue description was copied directly from pypa/pip#10817 in response to this comment: pypa/pip#10817 (comment)
Description
I am trying to install a package with a
mymodule~=0.16
dependency.Locally, I have
mymodule-0.16.0.dev1234
installed.When I run
pip install
, I get the following error:ERROR: No matching distribution found for mymodule~=0.16
Expected behavior
I expect a pre-installed dev version to be accepted in place of the regular version.
From PEP 440 (https://www.python.org/dev/peps/pep-0440/#handling-of-pre-releases):
pip version
21.3.1
Python version
3.8.12
OS
macOS Monterey version 12.1
How to Reproduce
Unfortunately the two modules in question are proprietary so you cannot reproduce with the exact modules. But in general the steps are
X.Y.0.devZ
version of a module.~=X.Y
requirement.Output
The text was updated successfully, but these errors were encountered: