-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Remove support for already-installed requirements #51
Comments
My instinct is that these behaviors should be implemented by pip itself. It's conceivable that |
I was able to replicate the issue:
I can replicate the issue without involving the script:
But if I try to replicate the behavior with pip only, the error doesn't occur:
It seems there's something about the way that |
Aha! I figured out why it's happening, and here's how to replicate the behavior with pip alone:
Notice that the
|
I wish pip had the "already installed" behavior built in natively. Looks like there is some prior efforts:
If Would you consider working with the pip team to provide a solution? |
In #104, we're considering completely rethinking the way pip-run is installed and invoked, putting it in its own environment and isolating its own dependencies from the target environment. This approach would eliminate the purpose of honoring "already-installed" dependencies. Maybe the best thing to do is deprecate support for already-installed dependencies and just always install the whole dependency tree. The original motivation for supporting already-installed requirements was inspired by how A secondary motivation for not installing already installed packages was for better performance in an environment with a lot of packages that are already satisfied. It does seem, however, as if that use-case is rare and the behavior can even be undesirable (causing surprise when Since |
As I think about it more, I'm not sure a deprecation period is useful. My guess is that not a lot of users are reliant on that behavior, and even if they are, the difference will primarily be a lower startup time. I would simply emit a deprecation warning (or comparable user warning) when the code filters out existing deps, but there would be nothing a user could reasonably do to avoid those messages without being incompatible with the future behavior. I'm considering instead just to remove the behavior in a breaking release. Users can pin to the old version if they need that old behavior. We can yank and add a deprecation notice if it turns out to cause more than a modicum of disruption. |
Released as pip-run 13. |
I have a scenario where if I make the following
requirements.txt
file:and pass it with
-r
, everything is fine.If I add this to the script i'm running, and remove the
-r
flag:I get an error because my site-packages has
jwt 1.1.0
andcryptography 3.2.1
installed:What i'd like:
-r
behavior without having to make another separate fileWhat I'd love:
The text was updated successfully, but these errors were encountered: