Skip to content

Instantly share code, notes, and snippets.

@rdammkoehler
Created March 8, 2018 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdammkoehler/1a0ebbcac95c14729bd5761f217ecb55 to your computer and use it in GitHub Desktop.
Save rdammkoehler/1a0ebbcac95c14729bd5761f217ecb55 to your computer and use it in GitHub Desktop.
A one-liner to collect the versions of all your python dependancies via pip.
pip list --format columns | tail "-n $(expr $(pip list --format columns | wc -l) - 2)" | awk '{print $1}' | xargs -I {} bash -c "pip show {} | grep -v Summary | grep -v Home-page: | grep -v Author | grep -v Location | grep -v Requires | tr '\n' ' ' | awk '{print $1}'" | awk '{print $2,$4,$6}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment