-
Install pyenv using pyenv-installer:
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
-
Activate pyenv for Terminal:
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
-
Exit and restart Terminal.
-
Install Python:
pyenv install 3.6.1 pyenv global 3.6.1 system
-
Exit and restart Terminal.
-
Verify that you are now using the version of Python you just installed:
python --version
-
Install pyenv-virtualenvwrapper:
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
-
Activate pyenv-virtualenvwrapper for Terminal:
echo 'export WORKON_HOME="$HOME/.virtualenvs"' >> ~/.bash_profile echo 'export PIP_VIRTUALENV_BASE="$WORKON_HOME"' >> ~/.bash_profile echo 'pyenv virtualenvwrapper_lazy' >> ~/.bash_profile
-
Exit and restart Terminal.
-
Set up the Django Girls Tutorial project:
mkdir $HOME/djangogirls mkvirtualenv djangogirls -a $HOME/djangogirls
-
Continue with setting up Django.
Hint: You might have to scroll up due to a bug on the Django Girls website.
Last active
September 11, 2018 06:44
-
-
Save gsong/d350274d96ef83ea48773ea6ef33ab0d to your computer and use it in GitHub Desktop.
Pyenv Setup Step-by-step
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment