I\'m on OSX El Capitan, using Python 2.7 (Anaconda). Launching the command pip install MySQL-python
yields:
Collecting MySQL-python
Using cach
This solved my issue:
brew install mysql@5.7
brew link --force mysql@5.7
Copy from this blog.
By finding out the information that mysql-connector-c
might come to the conclusion that the configuration by brew installation may be incorrect , open the /usr/local/bin/mysql_config
script to modify some of the contents of it:
#Create options
Libs = "-L$pkglibdir "
Libs = "$libs -l"
change into:
#Create options
Libs = "-L$pkglibdir"
Libs = "$libs -lmysqlclient -lssl -lcrypto"
Save
Then re-install mysql-python:
pip install mysql-python
I got the same error while installing pip install MySql-python
.
Then, I had installed libmysqlclient-dev
using the command:
sudo apt install libmysqlclient-dev
After installing it, I tried again and pip install MySql-python
and it worked for me.
I met same error and solved with following instructions: