Alex-Just
1/12/2017 - 12:36 PM

pyenv.sh

# One-liner
pyenv global 3.5.2 && virtualenv .env -p $(pyenv which python) && . .env/bin/activate && python -V && pyenv global system

# List installed versions
pyenv versions

# Set global version to
pyenv global 3.5.2

# Check current set version
pyenv which python

# Create virtualenv using current global version
virtualenv .env -p $(pyenv which python)

# Activate and check env's version
. .env/bin/activate && python -V

# Rollback global version to system
pyenv global system

# Install new version
pyenv install 3.7