How to upgrade all Python packages with pip

preview_player
Показать описание
**Command for Windows System :
pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}

**Instructions for Linux System :
*To upgrade all packages using pip with grep on Ubuntu Linux:
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U

Thanks for watching this video !

Don't forget to drop a like and share it with your friends !

Subscribe to the Hackanons channel for more such interesting videos !
Рекомендации по теме
Комментарии
Автор

It does not work in Fedora as IT says: ERROR: List format 'freeze' cannot be used with the --outdated option. ERROR: You must give at least one requirement to install (see "pip help install")

andrewseven
Автор

Excellent, thank you! (works perfectly on Win 11, btw)

chuckbecker
Автор

It does not work at all. I am surprised you did not execute the command if it is really working.
How come you did not try? Because if your libraries are all up-to-date, it should give you "requirements satisfied".
But I think you did not want to run because you will definitely face the same error issue we had.
Just a thought to consider next time you post a video

ABMA
Автор

Thanks, that was what I was looking for!

CaribouDataScience
Автор

It says the command is not recognized for windows

MohAmuza