Skip to content

Instantly share code, notes, and snippets.

@heyajulia
Last active August 5, 2026 21:22
Show Gist options
  • Select an option

  • Save heyajulia/254fa32f78d1005e050f25c722798dd5 to your computer and use it in GitHub Desktop.

Select an option

Save heyajulia/254fa32f78d1005e050f25c722798dd5 to your computer and use it in GitHub Desktop.
How to Upgrade Python using Pyenv and Raku using Rakubrew

Here's what I do:

brew upgrade --quiet pyenv
OLD_VERSION=$(cat ~/.pyenv/version)
NEW_VERSION=$(pyenv install -l | awk '/^[[:space:]]+[0-9]/ { sub(/^[[:space:]]+/, ""); print }' | sort -Vr | fzf)
pyenv uninstall $OLD_VERSION
pyenv install $NEW_VERSION
pyenv global $NEW_VERSION
pyenv rehash # idk if this is needed
pip install pipx
pipx ensurepath
echo "llm uv" | xargs -n 1 pipx reinstall
OLD_VERSION="$(rakubrew version | cut -d" " -f3)"
NEW_VERSION=$(rakubrew available | egrep '^ D' | cut -d' ' -f 3 | sort -Vr | fzf)
rakubrew download $NEW_VERSION
rakubrew switch moar-$NEW_VERSION
rakubrew nuke moar-$OLD_VERSION
zef install Readline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment