Updating all outdated packages on Windows
suggest changepip 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.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents