$ pip freeze > requirements.txt
Open the text file, replace the == with >=, or have sed do it for you:
$ sed -i ‘s/==/>=/g’ requirements.txt
and execute:
$ pip install -r requirements.txt –upgrade
https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip