Skip to content

Instantly share code, notes, and snippets.

View jaysin586's full-sized avatar

Jason Kummerl jaysin586

View GitHub Profile
@jaysin586
jaysin586 / pyenv_update.sh
Last active April 11, 2023 16:21
PyENV Update Script
# A function to update the python version in a pyenv virtualenv
# Usage: pyenv_update <version>
# Example: pyenv_update 3.9.7
# Note: This will remove the virtualenv and recreate it.
pyenv_update() {
PYENV_FILE=.python-version
PYENV_FREEZE_FILE=.requirements-lock.txt
if [ -z "$1" ]; then
echo "Please specify the version of python to update to."
return