Tag Archives: mysqldb

Install MySQLdb for Python 2.x

If you want to install MySQLdb for Python 2.x, without using the package manager of your Linux distro (Ubuntu in our case), you can do it through pip like this:

First you must to have installed libmysqlclient-dev (and, of course pip)

After that execute this two commands:

Test if is working:

Type in the command line:

and in the python console:

That’s all. Enjoy!