KevCaz's Website

Even if I do not frequently code in Python, my setup includes several packages of this programming language. While I was looking for a simple way to update all installed packages, I found this thread on stack overflow which helps me writing the following alias in my zsh profile:

1
2
3
alias updpy='for i in  $(pip list --outdated --format=columns |tail -n +3|cut -d" " -f1)
    do pip install --user $i --upgrade
done'

Now, when I enter updpy in my Terminal, all installed Python packages are updated. Pretty sweet 😄! Note that if you are using Python more often that I do, you may benefit from installing the package manager Conda. With Conda, all you need to do is:

1
$ conda install package-name

to install a Python package, and:

1
$ conda update --all

to update all installed packages.