-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add option to upgrade all packages in the environment, e.g., upgrade --all
#1419
Comments
Thanks! We should also clarify how |
Hi, just wanted to add my voice for this one. Thanks. |
This would be a great feature! Any updates? |
Hi, please just upvote the original post with 👍 if you want to see this. Otherwise we'll report back with any updates and would appreciate if the thread was focused on substantive discussion. For this to move forward two things need to happen:
|
I would really love to see this feature added. I'm not sure if it's helpful, but I can describe how I currently update the packages in my virtual python environments. These are all run from an activated venv. In this case I have an environment for some polars projects. I first run: pip list --outdated Which produces a list:
This example is a mercifully short list since Polars doesn't have other Python dependencies. Plus, since it's a playground for testing one off things I want to try in polars, I don't have a ton of packages in this environment....but this list can get very long for larger projects (which is time consuming to manually update) I'll then go one by one running (for example): pip install --upgrade polars There are times I'm unable to update all the packages. Usually if I have a failure, it's because @zanieb To answer some of the questions you listed (granted these are just MY opinion or my use case) Why isn't this being implemented in pip? This is a great question and something I've often wondered as well! I've come across both pip-tools and pip-review which is/was a fork of pip-tools and I think it's no longer maintained. What is the desired behavior? Is there more than one expectation? The simple version of what I would want: simply update all the packages in the environment, and report what was/wasn't updated:
I'm of course open to other ideas too. What is the main user-story for this? What use-cases are we addressing? I'm not sure if it's just the work I do, but I'm often seeing new functionality in packages and/or I just like to stay current. Especially right now with many tools being updated/written in Rust, so I like to try out different things and see where development is at. I've never done (nor would I plan to) and "update all" in production. Though if enough tools are written in Rust and don't have Python dependencies, maybe much of this goes away? Apologies if any of that is unclear. Just let me know if I can further clarify anything. Thanks!! |
I'm interested in this feature too. I don't know if it would help, but I'm currently updating the packages using:
Edit: As commented by @bryant1410 and @D1no, I agree it's better:
It works fine if using the uv as project manager. |
The request for a uv update command to upgrade all packages is rooted in the fact that uv is more than just a package manager - it also handles environment management like conda, micromamba, and poetry. These tools already offer similar functionality:
This point talks about why it makes more sense to implement it at the higher level tool instead of pip pypa/pip#4551 (comment) The primary use case is for development environments, particularly in fields like deep learning or data science, where frequent package updates are necessary. |
How is this different from uv lock --upgrade ? |
Am I mistaken or would this only apply to cases where you're using |
Yeah please add an update command that actually updates the version strings in the pyproject.toml for explicitness
instead of having to do |
upgrade --all
optionupgrade --all
I use this tiny script to upgrade all dependencies to their latest version regardless of what is specified in |
This specific part of your request is tracked in |
If uv pip list --outdated --format=plain | uv pip install -U My current workaround for this looks like: uv pip list --outdated --format=json | jq '.[].name' | xargs -I {} uv pip install --system -q -U {} |
seems to do what is required. but please can this be added as an alias type thing in uv?
got used to
so being able to "update" them all is very useful. i just found the uv lock --upgrade and sync thing now. but i can guarantee i will have forgotten about it next time i need it lol. thanks for the project! its insanely fast |
Various package managers have overlapping and/or conflicting definitions of the word If existing commands are sufficient then I'd rather the documentation be updated to make it clear what the right commands are. I find it all a bit confusing, especially (and this isn't uv's fault itself) coming over from Poetry which seems have both That said, hopefully someone can chime in here if I'm wrong:
And to check if there are updates, I use |
And how about on sync pyproject with uv.lock after |
I like the idea of this, wouldn't break the existing functionality then |
... or at least I used to. It seems now Perhaps |
While I'm not sure it's the best way to solve this problem, I'm fine with allowing See #10273 for the motivation behind making those options conflict. |
Thanks. |
Something missing from pip is the ability to do
upgrade --all
like conda can doupdate --all
in an environment.Wrappers around pip that do this are oftentimes slow because python. Given that you already have some resolution strategies available, it would be really nice to see something like that. And it's also gonna be very fast in your case I believe.
The exact resolution strategy for something like that is up for discussion but I think resolution strategies like the one conda uses have been liked by the community.
The text was updated successfully, but these errors were encountered: