Configure A Python Django Virtualenv Mac OS X for Postgresql and Mysql

May 24, 2011 | By Regaz.

The Guide shows you How to Configure a Python Django Virtualenv macOS X to Work with MySQL and PostgreSQL Databases.

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

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

Django virtualenv macOS X - Python Apple

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

How to Install Python Virtualenv on macOS X:

Python-Virtualenv macOS X
cd </path/2>

Example:

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 macOS X .)


QuickChic Theme • Powered by WordPress