Skip to content

Instantly share code, notes, and snippets.

@noromanba
Last active June 6, 2026 21:38
Show Gist options
  • Select an option

  • Save noromanba/d2b7472bc8cba64f8b98c0069826764d to your computer and use it in GitHub Desktop.

Select an option

Save noromanba/d2b7472bc8cba64f8b98c0069826764d to your computer and use it in GitHub Desktop.
pseudo `pip-upgrade`
#!/usr/bin/env bash
# pseudo `pip upgrade`
# @version 2026.6.5.2
# @license CC0 Univ PD https://creativecommons.org/publicdomain/zero/1.0/
# @author noromanba https://noromanba.github.io
set -eCx
# require uv
# [1] avoid `uv pip freeze`
uv pip list --format freeze |
cut --fields='1' --delimiter='=' |
xargs uv pip install --upgrade
# [^1] `uv pip freeze` unexpected output for `python-*` packages
#
# e.g. Termux python-pip
#
# $ uv pip freeze
# pip @ file:///home/builder/.termux-build/python-pip/src
#
# outputs the local build directory path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment