Skip to content

Instantly share code, notes, and snippets.

View luketainton's full-sized avatar
🏠
Working from home

Luke Tainton luketainton

🏠
Working from home
View GitHub Profile
@luketainton
luketainton / pyenv-upgrade
Created July 10, 2022 12:07
Upgrade all Pyenv virtual environments to current global version
#!/usr/bin/env bash
# set target Python version
targetversion=$(pyenv global)
venvtargetversion=$(echo "$targetversion" | sed 's/\.//g')
# cd to directory where script was called
cd "$PWD"
# get name of current venv