WRITELOOP

PYENV TIPS

2017 January 3

(tested on arch linux)

INSTALLATION

On Arch linux, through AUR: $ packer -S pyenv pyenv-virtualenv –noconfirm

CHEATSHEET

Install python versions:

$ pyenv install –list $ pyenv install 3.5.1

CREATE a virtualenv:

$ pyenv virtualenv 3.5.1 test_351_1

LIST virtualenvs:

$ pyenv virtualenvs

ACTIVATE / DEACTIVATE virtualenvs:

$ pyenv activate (“name” must come from the list above) $ pyenv deactivate For activate to work, I recommend my .bashrc which can be found at github at https://github.com/tiagoprn/dot_files/blob/master/.bashrc. Alternatively, you can use the old source ~/.pyenv/versions/[your-venv]/bin/activate and deactivate commands.

DELETE a virtualenv:

$ pyenv uninstall

On (arch) linux, the virtualenvs will be at:

~/.pyenv/versions/ another good reference: http://fgimian.github.io/blog/2014/04/20/better-python-version-and-environment-management-with-pyenv/

TAGS