1
votes

I am getting the below error when trying to pip install mysql:

building '_mysql' extension creating build/temp.macosx-10.6-intel-2.7 /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mysql/8.0.12/include/mysql -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o _mysql.c:44:10: fatal error: 'my_config.h' file not found #include "my_config.h" ^~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit status 1

Any ideas?

2
Which OS are u on.?Sreeram TP
High Sierra 10.13.4user3296793
You have xcode installed.? If not try xcode-select --install after that install mysqlSreeram TP

2 Answers

2
votes

you don't have my_config file. It is because you have not installed mysql on your computer. Try to install after setup mysql

0
votes
brew remove mysql
brew install [email protected]
brew link --force [email protected]
pip install mysql-python