Skip to content

Instantly share code, notes, and snippets.

@zahna
Last active December 28, 2025 01:58
Show Gist options
  • Select an option

  • Save zahna/b82b381bda3f195ff10e242639f3629b to your computer and use it in GitHub Desktop.

Select an option

Save zahna/b82b381bda3f195ff10e242639f3629b to your computer and use it in GitHub Desktop.
cd $HOME
git clone git@github.com:pyenv/pyenv.git .pyenv
git clone https://github.com/pyenv/pyenv-virtualenv.git ./.pyenv/plugins/pyenv-virtualenv
In your .profile, add:
# Initialize pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
Then:
. .profile
pyenv versions
pyenv install -l
pyenv install {version}
pyenv virtualenv {version} {version}_main
pyenv activate {version}_main
pip install -r ./requirements.txt
deactivate
pyenv global {version}_main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment