Upgrading all packages with pip

Tags: python pip
Question!

Is it possible to upgrade all Python packages at one time with pip?

Note that there is a feature request for this on the official issue tracker.



Answers
pip list | awk -F ' ' '{print $1}' | xargs -l pip install --upgrade   


Here is my variation:

pip list --outdated --format=legacy | awk '{print $1;}' | xargs -n1 pip install -U


I have tried the code of Ramana and I found out on Ubuntu you have to write sudo for each command. Here is my script which works fine on ubuntu 13.10:

#!/usr/bin/env python
import pip
from subprocess import call

for dist in pip.get_installed_distributions():
    call("sudo pip install --upgrade "   dist.project_name, shell=True)
By : antibus


This video can help you solving your question :)
By: admin