I installed MySQL and Workbench from website. I have a django project whose requirements.txt:
Django==1.11.12
djangorestframework==3.8.2
django-cors-headers=
Please, try:
CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install -r requirements.txt
If it does not work: First install mysql-connector-c
brew install mysql-connector-c
pip install MySQL-python
If you are using Windows:
https://dev.mysql.com/downloads/connector/c/
You can also check what happend when you try install it with pip3.
UPDATE:
If you have Linux:
Please open the /usr/local/bin/mysql_config
.
And then:
#Create options
Libs = "-L $ pkglibdir "
Libs = " $ libs -l"
replace with:
#Create options
Libs = "- L $ pkglibdir"
Libs = "$ libs -lmysqlclient -lssl -lcrypto"
Save it and reinstall mysql-python
.
pip uninstall mysql-python
pip install mysql-python
For Mac:
LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysql-python
should be helpful.