Configure a Python Django virtualenv Mac OS X for Postgresql and Mysql

May 24, 2011 | By Regaz | Filed in: Uncategorized.

The Guide Shows You How to Configure a Python Django Virtualenv Mac OS X to Work with MySQL and PostgreSQL Databases.

The tutorial make use of pip, virtualenv and virtualenvwrapper to Configure Python Virtualenvs for Mac OS X.

The Content is Expressly Reduced to Give Focus Only to Essential and Practical Steps and Commands of Django Virtualenv Mac OS X Setup :)

Django virtualenv Mac OS X - Python Apple

To Install virtualenv and virtualenvwrapper on Mac OSX look to my other tutorial:

How to Install Python Virtualenv on Mac OS X:

Python-Virtualenv Mac OS X
cd </path/2>


cd ~/.virtualenv

Now to Make a Virtual Environment Sand-Box for your Django Installation:

virtualenv --no-site-packages django1.2.1

Activating the New Created Virtualenv Environment:

source django1.2.1/bin/activate

Installing Django for the Newly Activated Virtual-Environment:

pip install django==1.2.1

Then Provide to install the adapter for MySQL:

easy_install -U distribute
sudo pip install MySQL-python

And for PostgreSQL:

sudo pip install psycopg2

After you are Ready to work with Django, PostgreSQL and MySQL on Mac OS X .)

Tags: , , ,