Skip to content

Instantly share code, notes, and snippets.

@alexandru
Created October 7, 2019 17:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandru/49d4d31179665d050b4269143e3f3c78 to your computer and use it in GitHub Desktop.
Save alexandru/49d4d31179665d050b4269143e3f3c78 to your computer and use it in GitHub Desktop.

First install pyenv.

Afterwards ...

Installing a Python version:

pyenv install 2.7.14

Creating a new virtualenv:

pyenv virtualenv 2.7.14 myspecialenv

Uninstalling a virtualenv:

pyenv uninstall myspecialenv

To automatically switch virtualenv when switching to the project's folder:

$ echo "myspecialenv" > .python-version 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment