What's the problem this feature will solve?
When installing a package that requires a specific python version its dependencies are installed first, which
- downloads a bunch of dependencies unnecessarily
- can result in a confusing message when those dependencies don't have a distribution
eg:
myapi has python_requires=">=3.7" and depends on mylib. mylib has only been built for python 3.6.
pip install myapi with the Python 3.6 interpreter will download all dependencies and error with:
pip._internal.exceptions.DistributionNotFound: No matching distribution found for mylib==1.2.3
Describe the solution you'd like
pip install myapi with the Python 3.6 interpreter won't download dependencies and will error with the more helpful:
ERROR: Package 'myapi' requires a different Python: 3.6.10 not in '>=3.7'
Alternative Solutions
Additional context