How can I use Conda to install MySQLdb?

I’ve read several different explanation regarding how to install MySQLdb, but I’m not sure which case applies to me since my error message is different. My system can’t seem to find MySQLdb. I installed pymysql, but i need to import MySQLdb to use procedures from that library.

Thanks for your help.

$ conda install MySQLdb

Fetching package metadata: …. Error: No packages found in current osx-64 channels matching: mysqldb

Did you mean one of these?


You can search for this package on with

anaconda search -t conda mysqldb

$ anaconda search -t conda mysqldb

Using anaconda-server api site Run ‘anaconda show ‘ to get more details: No packages found Name | Version | Package Types | Platforms
————————- | —— | ————— | ————— Found 0 packages


You could either fall back on pip install:

pip install mysql-python

or, if there are issues with pip as in your case, use a binstar package like so:

conda install binstar
binstar search -t conda mysql-python

and then conda install -c a matching package.