Skip to content

Instantly share code, notes, and snippets.

@extratone
Created September 25, 2022 11:11
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 extratone/e1cc5b3053573aa5ca4e41468470c3cb to your computer and use it in GitHub Desktop.
Save extratone/e1cc5b3053573aa5ca4e41468470c3cb to your computer and use it in GitHub Desktop.
Commands to update all Python packages on Windows or Linux systems.
pip list --outdated
pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
pip3 list -o | cut -f1 -d' ' | tr " " "\n" | awk '{if(NR>=3)print)' | cut -d' ' -f1 | xargs -n1 pip3 install -U
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
pipenv shell
pipenv update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment