Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing python2 & python3 and virtualenv (Ubuntu 14.04)
# Python 2
sudo apt-get install python-pip
pip install --user virtualenv
python ~/.local/bin/virtualenv venv2
# Python 3, option 1
sudo apt-get install python3-pip
pip3 install --user virtualenv
python3 ~/.local/bin/virtualenv venv3
# Python 3, option 2
sudo apt-get install python3.4-venv
pyvenv-3.4 venv3
venv3/bin/pip install pip --upgrade # If you want, it's 1.5.4 bundled by default
@dracos
Copy link
Author

dracos commented Mar 10, 2016

For environment variables, depends what you want, but e.g.:

  • pip install autoenv, source that in your .bashrc and put your environment variables in .env files that are automatically run when you cd into that directory;
  • Install virtualenvwrapper and put environment variable setup/teardown in your postactivate/predeactive files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment