Skip to content

Instantly share code, notes, and snippets.

@Ch00k
Last active March 12, 2016 07:49
Show Gist options
  • Save Ch00k/5b4653ebf2059577002e to your computer and use it in GitHub Desktop.
Save Ch00k/5b4653ebf2059577002e to your computer and use it in GitHub Desktop.
Installing Python and creating a virtualenv (Linux, Mac OS X, Windows)

Linux

CentOS

sudo yum -y update
sudo yum -y install centos-release-SCL  # the package is part of CentOS Extras repository
sudo yum -y install python27
source /opt/rh/python27/enable
virtualenv my_venv
source my_venv/bin/activate

Ubuntu

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install python-virtualenv
virtualenv my_venv
source my_venv/bin/activate

Mac OS X

easy_install virtualenv
virtualenv my_venv
source my_venv/bin/activate

Windows

Download Python installer and install making sure you check the Add Python 3.5 to PATH checkbox. In cmd.exe run:

pip install virtualenv
virtualenv my_venv
my_venv\Scripts\activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment