Update #Python modules #pip regularly #NotetoSelf
We update our linux boxes almost regularly, so Debian/Ubuntu user like me run apt update && apt upgrade -y regularly. But, we miss updating python library regularly which breaks a lot of python modules or make them outdated.
Sharing 2 methods to do it easily with single liner.
1)
Python 2.x:
pip list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip install -U
Python 3.x:
pip3 list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
2)
pip3 install pipdate
then run pipdate command from shell.