I am trying to install MySQLdb package. I found the source code here.
I did the following:
gunzip MySQL-python-1.2.3c1.tar.gz
tar xvf MySQL-python-1.
@main:
$ su
$ yum install MySQL-python
and it will be installed (MySQLdb).
For Python 2.7, one can easily install using this
apt-get install python2.7-mysqldb
This was sort of tricky for me too, I did the following which worked pretty well.
chmod
the egg to be executable: chmod a+x [egg]
(ie, for Python 2.6, chmod a+x setuptools-0.6c9-py2.6.egg
)./[egg]
(ie, for Python 2.6, ./setuptools-0.6c9-py2.6.egg
)Not sure if you'll need to use sudo if you're just installing it for you current user. You'd definitely need it to install it for all users.
well installing C compiler or GCC didn't work but I found a way to successfully install mysqldb package
kindly follow Mike schrieb's (Thanks to him) instructions here . In my case, I used setuptools-0.6c11-py2.7.egg and setuptools-0.6c11 . Then download the executable file here then install that file. hope it helps :)
After trying many suggestions, simply using sudo apt-get install python-mysqldb
worked for me.
More info: Getting "Error loading MySQLdb module: No module named MySQLdb" - have tried previously posted solutions