Install mysqlclient under MAC and mysql_config: command not found

Install mysqlclient under MAC and mysql_config: command not found

Blog description

The information involved in the article comes from the Internet collation and personal summary, which means personal learning and experience summary. If there is any infringement, please contact me to delete it.

Explanation

I did not encounter this problem before, and this problem occurred during the installation after reinstalling the system

Problem screenshot

image-20200422142638288

Solution

Execute the following command

brew install mysql-connector-c 

image-20200422143604615

Configure environment variables according to the prompts, if you do not configure environment variables, you will still get an error

export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PATH="/usr/local/opt/mysql-client/bin:$PATH"

image-20200422144808940

Remember to apply the configuration file and install mysqlclient again

 pip3 install mysqlclient

image-20200422144851394

thank

Omnipotent network

As well as a hardworking self

Published 276 original articles · praised 681 · 40,000+ views

Guess you like

Origin blog.csdn.net/qq_45163122/article/details/105682062