Over a million developers have joined DZone.
Platinum Partner

Installing Git and Virtualenv on Linux or Mac

· DevOps Zone

The DevOps Zone is brought to you in partnership with Librato.  Check out Librato's whitepaper on Selecting a Cloud Monitoring Solution.

For Debian/Ubuntu Linux:

sudo apt-get install git python-setuptools

For Redhat/Fedora Linux:

sudo yum install git python-setuptools

For Mac:

Install MacPorts and then:
sudo port install git python-setuptools

Continuing on for all of the above

sudo easy_install pip
sudo pip install virtualenv virtualenvwrapper

Now, you may want to set some defaults in your ~/.bashrc. My relevant entries look like this:

export WORKON_HOME=$HOME/Projects
source /usr/local/bin/virtualenvwrapper.sh

git config --global user.name "Terse Col"
git config --global user.email myemail@gmail.com
git config --global http.sslVerify false

Now away you go:

mkdir $HOME/.virtualenvs
source $HOME/.bashrc
mkvirtualenv mynewproject 


Published at DZone with permission of Col Wilson , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}