Installing MySQLdb 1.2.3 with Python For Django on Mac OSX?
Question: I am a beginner Java developer and newbie to Python and I want to install
Django and from what i understood that i need to install MySQLdb 1.2.3 with
Python and I have MySQL already installed so I am trying to do so and all the
guides I find is for 1.2.2 and what I did after installing is

    
    
    sudo python setup.py
    

and this is what I get

    
    
    Traceback (most recent call last):
      File "setup.py", line 5, in <module>
        from setuptools import setup, Extension
    ImportError: No module named setuptools
    

So, is there a simple guide I can follow or a fix to that error to get MySQLdb
installed and running ?

By the way I am using Lion.

Update 1 : i've found this tutorial and followed it
[Here](http://djangrrl.com/post/installing-django-with-mysql-on-mac-os-x/) and
the result now i get when i run and i've downloaded the version 1.2.2 and did
the work on it

    
    
    python setup.py build
    

that's what i get

    
    
    running build
    running build_py
    copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-2.7/MySQLdb
    running build_ext
    building '_mysql' extension
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
    unable to execute gcc-4.2: No such file or directory
    error: command 'gcc-4.2' failed with exit status 1
    

So what can i do ?


Answer: You have to make sure that all components were built for the same
architecture. A 32 bit MySQL only works with 32bit Python. Unfortunately lion
only supports 64bit MySQL.

I just ended up using [mariadb](http://mariadb.org/). That was much easier
than installing MySQL and MySQL_Python.

    
    
    brew install mariadb
    

To run django you should also install PIL (Python Image Library), lxml:

    
    
    sudo pip install PIL
    sudo pip install lxml
    

and gettext (Translations) using [brew](http://mxcl.github.com/homebrew/)

    
    
    brew install gettext
    

