Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL-python install Mac

I am trying to install MySQLdb for Python on my mac so I can use it to test. I am running OS X 10.11.4. Everywhere I look says to use

pip install MySQL-python

Every time I do that I get an error saying.

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/4s/4wwhr6zj59sf0c4qkprqbsp80000gn/T/pip-build-042_KK/MySQL-python/

I am running the command just right when I open a new shell, should I change the path?

like image 986
Cody Weaver Avatar asked Jul 24 '16 06:07

Cody Weaver


People also ask

Can I install MySQL on Mac?

MySQL for macOS is available in a number of different forms: Native Package Installer, which uses the native macOS installer (DMG) to walk you through the installation of MySQL.


1 Answers

install mysql connector using homebrew brew install mysql-connector-c then install mysql-python using pip pip install mysql-python or try PyMySQL its a pure python client library, you can install using pip install PyMySQL and upgrade setuptools. pip install --upgrade setuptools.

like image 192
NishanthSpShetty Avatar answered Oct 19 '22 22:10

NishanthSpShetty