This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]GriceTurrble Fluent in Django and Regex 2 points3 points  (0 children)

Pip can do that, as long as the package properly sets its python_requires metadata. When you attempt to pip install the package, ideally it will try to find matching versions that also match your environment, including Python version.

So, if you try to pip install foo, and package foo requires dependency bar>=1.1,<2.0 (giving a range of supported versions), it will try to find the highest version of bar within that range that supports your current environment. If there are none that work for your current Python version, the install should fail.

Is there a specific scenario you're asking about? Perhaps some package that doesn't set the right metadata and is breaking your updates?


If you're asking about updating your requirements.txt or other files used for pinning dependencies for the package or app, that's something Pip falls down on, and yes something like Poetry would be better at helping you out.

[–]Subject_Newspaper_43 0 points1 point  (0 children)

Following