Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Created August 25, 2017 04:09
Show Gist options
  • Save tom-henderson/1ada2cf77f527e8cfde8eb257dadd54a to your computer and use it in GitHub Desktop.
Save tom-henderson/1ada2cf77f527e8cfde8eb257dadd54a to your computer and use it in GitHub Desktop.
Installing / uninstalling packages with pip
# Save current installed packages
pip freeze > requirements.txt
# Install packages from requirents.txt
pip install -r requirements.txt
# Remove packages not in requirements.txt
pip freeze | grep -v -f requirements.txt - | xargs pip uninstall -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment