How to use MySQLdb with Python and Django in OSX 10.6?
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Breezy Bay
--
Chapters
00:00 How To Use Mysqldb With Python And Django In Osx 10.6?
01:41 Answer 1 Score 329
02:20 Answer 2 Score 62
02:29 Answer 3 Score 58
02:52 Answer 4 Score 19
03:02 Thank you
--
Full question
https://stackoverflow.com/questions/2952...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #mysql #django #virtualenv #virtualenvwrapper
#avk47
    Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Breezy Bay
--
Chapters
00:00 How To Use Mysqldb With Python And Django In Osx 10.6?
01:41 Answer 1 Score 329
02:20 Answer 2 Score 62
02:29 Answer 3 Score 58
02:52 Answer 4 Score 19
03:02 Thank you
--
Full question
https://stackoverflow.com/questions/2952...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #mysql #django #virtualenv #virtualenvwrapper
#avk47
ANSWER 1
Score 329
I had the same error and pip install MySQL-python solved it for me.
Alternate installs:
- If you don't have pip, 
easy_install MySQL-pythonshould work. - If your python is managed by a packaging system, you might have to use
that system (e.g. 
sudo apt-get install ...) 
Below, Soli notes that if you receive the following error:
EnvironmentError: mysql_config not found
... then you have a further system dependency issue. Solving this will vary from system to system, but for Debian-derived systems:
sudo apt-get install python-mysqldb
ANSWER 2
Score 62
Running Ubuntu, I had to do:
sudo apt-get install python-mysqldb
ANSWER 3
Score 58
Adding to other answers, the following helped me finish the installation mysql-python:
virtualenv, mysql-python, pip: anyone know how?
On Ubuntu...
apt-get install libmysqlclient-dev
apt-get install python-dev
pip install mysql-python
Don't forget to add 'sudo' to the beginning of commands if you don't have the proper permissions.
ANSWER 4
Score 19
mysql_config must be on the path. On Mac, do
export PATH=$PATH:/usr/local/mysql/bin/
pip install MySQL-python