Mac pip Install Mysql-python

Source: Internet
Author: User

For the first time under Mac OS, the following error often occurs when you install Mysql-python with PIP:

Sh:mysql_config:command not found
Traceback (most recent):
File "setup.py", line <module>
metadata, Options = Get_config ()
File "/users/***/downloads/mysql-python-1.2.3/setup_posix.py", line +, in Get_config
Libs = Mysql_config ("Libs_r")
File "/users/***/downloads/mysql-python-1.2.3/setup_posix.py", line, in Mysql_config
Raise EnvironmentError ("%s not found"% (Mysql_config.path,))
Environmenterror:mysql_config not found

After a search Baidu, Baidu said it knows the solution is not feasible, after a try, the real solution should be:

Go to MySQL website, download

http://dev.mysql.com/downloads/mysql/

MySQL and install

After the installation is complete, open the terminal and enter the following statement to modify the environment variables:

Path= "$PATH":/usr/local/mysql/bin

OK, now restart the terminal and enter

Pip Install Mysql-python

And then the problem is solved smoothly.

Mac pip Install Mysql-python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.