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
You need the Python interface module for MySQL. The Ubuntu package most likely just contains the database itself, and not the Python interface. As Ilan says above/below, just do "conda install mysql-python". when you install a library to use with anaconda, you have to install it with conda .
Installing with conda. To install conda packages, in the terminal or an Anaconda Prompt, run: conda install [packagename] During the install process, files are extracted into the specified environment, defaulting to the current environment if none is specified. Installing the files of a conda package into an environment can be thought ...
It does not install Python 3. If Python 3.7.0 is currently installed, and the latest version of Python is 3.9.0, then conda install python=3 installs Python 3.9.0.
How do I Install MySQLdb in Python? Before proceeding, you make sure you have MySQLdb installed on your machine. Just type the following in your Python script and execute it − If it produces the following result, then it means MySQLdb module is not installed − Note − Make sure you have root privilege to install above module.
Try to use this command:
conda install mysql-python
For those Googlers in 2018+, you can install from the bioconda channel
conda install -c bioconda mysqlclient
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With