Last active
June 2, 2020 03:45
-
-
Save karlding/18e47708942dd3c0ca1c4b3c6eac9dd9 to your computer and use it in GitHub Desktop.
Revisions
-
karlding created this gist
Dec 31, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ # pyenv + virtualenvwrapper cheat sheet ## Requirements * [pyenv](https://github.com/pyenv/pyenv) * [pyenv-virtualenvwrapper](https://github.com/pyenv/pyenv-virtualenvwrapper) ## Usage Install new Python versions ```bash pyenv install 2.7.13 ``` Anytime we install a new Python version, we immediately install ``virtualenvwrapper`` ```bash # switch versions pyenv shell 2.7.13 # install virtualenvwrapper_lazy pyenv virtualenvwrapper_lazy ``` Then to actually use the ``virtualenv`` ```bash # create a new virtualenv mkvirtualenv my_environment # disable virtualenv deactivate # list all environments workon # reactivate virtualenv workon my_environment ```