Updating all outdated packages on Windows

suggest change

pip doesn’t currently contain a flag to allow a user to update all outdated packages in one shot. However, this can be accomplished by piping commands together in a Windows command prompt:

for /F "skip=2 delims= " %i in ('pip list --outdated --local') do pip install -U %i

skip=2 drops the header and the separator line. Without it, the loop also tries to install the word Package. delims is a space, so %i is only the package name. In a .bat file, write %%i instead of %i. At the end of this process, all local packages should be updated.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents