pip upgrade

Created on 13 Dec 2018  路  9Comments  路  Source: pypa/pip

What's the problem this feature will solve?

It will upgrade the all the packages by default to it's latest version and only selected packages if specified after upgrade statement.

Describe the solution you'd like
pip upgrade
will be just like apt upgrade.
Upgrades all the pip packages to it's latest version.

Alternative Solutions

reinstall all the packages one by one.

Additional context

duplicate auto-locked

Most helpful comment

This is not about invoking a public API from pip, but instead having a single command on user's end.

OK, that has been suggested before (sorry, I can't find the threads right now), although no-one has yet been sufficiently motivated to take it forward. Personally, I don't really see the value, but I'm willing to listen if someone wants to take it forward,

It is, however, possible right now to write (and publish) your own front end, that simply forwards existing pip commands to pip, and forwards other commands to whatever plugin interface you want. Of course it's not as "official" as a pip plugin interface, and it does require you to install one extra tool (although you could probably arrange to only need to do that once, globally). But it would be a great prototype, for demonstrating both the benefits and the popularity of such an interface.

All 9 comments

The pip-tools package is already capable of doing this, along with other very useful things related to dependency management.

I sincerely hope functionality from pip-tools can be merged into pip itself.

this has repeatedly been suggested, but pypi is not a curated repackaged and tested in combination set of packages, it is a index

anybody that suggests that pypi can be treated like an apt package repository seriously underestimates the amount of work distros puts into making sure things actually really work together

a plain old upgrade all command is very likely to break the world as is

on top of that #988 still stands

Hmm, you're probably right.

(Just noticed - https://github.com/jazzband/pip-tools/issues/699)

This might be best left to 3rd party tools, like pipenv, poetry, pip-tools etc.

On second thought, can we have a plugin system for pip, kind of like how cargo subcommand works?

It might also be helpful to look at how other package managers are able to do this.
cargo (Rust), pub (Dart), npm (Node) all have this feature, and AFAIK, none of them have curated package repos.

As pip has no public API, plugins can't use pip's internal functions. So it's not obvious how a plugin would offer anything that an independent command couldn't.

This is not about invoking a public API from pip, but instead having a single command on user's end. So, I guess, revolves more around developer experience.

This is what cargo does-

Cargo is designed to be extensible with new subcommands without having to modify Cargo itself. This is achieved by translating a cargo invocation of the form cargo (?[^ ]+) into an invocation of an external tool cargo-${command} that then needs to be present in one of the user's $PATH directories.


For example - Here is an issue with pip-sync https://github.com/jazzband/pip-tools/issues/328.

The user has to install this 3rd party package inside their virtualenv everytime they want to use it. If we had a subcomamnd system that invoked the subcommand from user's $PATH dir, then it would eliminate that need.

This is not about invoking a public API from pip, but instead having a single command on user's end.

OK, that has been suggested before (sorry, I can't find the threads right now), although no-one has yet been sufficiently motivated to take it forward. Personally, I don't really see the value, but I'm willing to listen if someone wants to take it forward,

It is, however, possible right now to write (and publish) your own front end, that simply forwards existing pip commands to pip, and forwards other commands to whatever plugin interface you want. Of course it's not as "official" as a pip plugin interface, and it does require you to install one extra tool (although you could probably arrange to only need to do that once, globally). But it would be a great prototype, for demonstrating both the benefits and the popularity of such an interface.

Okay, I will try to create a MVP.

I'm closing this issue as a duplicate of #4551. Please have any further discussion there.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings