-
Notifications
You must be signed in to change notification settings - Fork 271
Description
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):
Pre-releases of any kind, including developmental releases, are implicitly excluded from all version specifiers, unless they are already present on the system, explicitly requested by the user, or if the only available version that satisfies the version specifier is a pre-release.
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
- Install a
X.Y.0.devZ
version of a module. - Install a module with a
~=X.Y
requirement.
Output
$ pip install mymodule
...
...
Successfully installed mymodule-0.16.0.dev1234
$ pip install othermodule
Processing /path/to/othermodule
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
ERROR: Could not find a version that satisfies the requirement mymodule~=0.16 (from othermodule) (from versions: none)
ERROR: No matching distribution found for mymodule~=0.16