Reputation: 1647
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
Upvotes: 16
Views: 62837
Reputation: 42905
Since early 2018, the mysql package has become available from the conda and anaconda channels. The former is often more up-to-date and, as of April 2021, provides version 8 compared to the latter's version 5.
Install using
conda install -c conda-forge mysql
Upvotes: 6
Reputation: 11
Python 3.8 should execute the following command
conda install -c anaconda mysql-connector-python
Upvotes: 1
Reputation: 6363
For Anaconda Python, @StephenRauch has the correct solution, as it is officially supported in the Anaconda Enterprise documentation:
conda install -c anaconda mysql-connector-python
Reference: https://enterprise-docs.anaconda.com/en/latest/data-science-workflows/data/mysql.html
Upvotes: 0
Reputation: 1035
For those Googlers in 2018+, you can install from the bioconda channel
conda install -c bioconda mysqlclient
Upvotes: 16
Reputation: 11
~/anaconda2$ conda install mysql-python
works on ubuntu 16.04
Upvotes: 1
Reputation: 706
To install this package with conda run:
conda install -c anaconda mysql-python=1.2.5
check here: https://anaconda.org/anaconda/mysql-python
Upvotes: 3