Last active
November 11, 2015 22:08
-
-
Save princebot/f0f9b1ad1b0c982d8cc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash function for updating all packages installed with either `pip` or | |
# `conda` in the current Python virtualenv or conda environment. | |
pyupdate() { | |
# If we're in a conda environment, update all packages conda installed. | |
which conda 2>/dev/null && conda update -y --all | |
# After we're done with conda, if we have pip, update pip then update any | |
# packages installed with pip. | |
if which pip 2>/dev/null; then | |
pip install -U pip | |
pip freeze --local \ | |
| awk -F'==' '{print $1}' \ | |
| xargs pip install -U | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment