-
Notifications
You must be signed in to change notification settings - Fork 3.1k
enable pip to upgrade all outdated packages #3819
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
It does not work for Windows 7 |
Well, cut and xargs are linux command line tools so it can't be expected to simply work on Windows. |
note that this is completely broken for pip style installers unlike a linux distribution where a set of packages goes trough release and maintenance processes, with QA pypi is a package index, not a quality assured distribution please dont pretend it can be used like one |
Sorry, I had no idea. I've edited my original comment. |
Closing as duplicate of the requested |
|
on win: |
@picibucor : i see |
@its0x08 : My bad, sorry. |
@its0x08 you can do this in a Bash-flavored shell without creating a temporary file using "process substitution": pip install --upgrade -r <( pip freeze ) Under the hood, this creates a temporary "named pipe" and then deletes it immediately after. |
Two comments.
|
For anyone who's tired googling that command line, I've added a command line tool to pipdate. Simply
and then
anytime you like. |
Thanks a lot @nschloe ! |
@nschloe How does that work for pip2 vs pip3? How can I run that for the nondefault pip? EDIT: Example usage
but I don't think this is necessary. |
Not sure what you mean, but if you file an issue over at https://github.com/nschloe/pipdated I'd be happy to discuss it. |
I've released a nice interactive pip requirements upgrader: https://github.com/simion/pip-upgrader |
@simion good job! 😃 |
@walchko thanks! Looking forward to receive feedback and improvement ideas :) |
All of the above is exactly why Why is this issue closed??? |
@texadactyl As @goetzc said, this issue was closed as a duplicate of #59. The discussion for adding an upgrade-all command would be done in #4551 but that is currently blocked by #988. |
python3.6 pip list -o | cut -d " " -f 1 | tail -n +3 | xargs pip install -U |
In PowerShell
|
i use |
pip list --format freeze | sed 's/==.*$//g' | xargs pip install -U |
This should work on multiple platforms (including Windows): The jq executable is available for many platforms. |
In PowerShell without pipelines. pip install --upgrade ((pip freeze) -replace '==.+','') |
Hey everyone! pip currently doesn't have a proper resolver (#988) which means that you can't be sure that installing a new package won't break a package. This means most of the commands listed here will likely break your environment in some weird way. That said, we have a tracking issue for upgrade-all command (#4551) so I suggest you subscribe to that issue for updates on this topic. |
Description:
I would like
pip
to upgrade all outdated packages identified bypip list --outdated
in one simple command. It would also be nice to havepip outdated
show the outdated package too.What I've run:
this works for me (so far), but from a usability stand point, people shouldn't have to do this just to keep their packages up to date:
The text was updated successfully, but these errors were encountered: