How can I use Conda to install MySQLdb?

James Eaves picture James Eaves · Dec 7, 2015 · Viewed 46.9k times · Source

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?

pymysql

You can search for this package on anaconda.org with

anaconda search -t conda mysqldb

$ anaconda search -t conda mysqldb

Using anaconda-server api site https://api.anaconda.org Run 'anaconda show ' to get more details: No packages found Name | Version | Package Types | Platforms
------------------------- | ------ | --------------- | --------------- Found 0 packages

Answer

maverik picture maverik · Aug 25, 2016

Try to use this command:

conda install mysql-python