MySQL-python installs Mac

I am trying to install MySQLdb for Python on my mac, so I can use it for testing. I am running OS X 10.11.4. Wherever I look, say use

pip install MySQL-python

Every time I do this, I get an error.

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 run the command immediately when I open a new shell, should I change the path?

+4
source share
1 answer

install the mysql connector with homebrew brew install mysql-connector-c, then install mysql-python with pip pip install mysql-pythonor try PyMySQL with its clean python client library, which you can install with pip install PyMySQLand upgrade setuptools. pip install --upgrade setuptools.

+8

Source: https://habr.com/ru/post/1648914/


All Articles