I created virtualenv for django 1.9 project. I am trying to pip install mysqlclient or mysql-python but both of them gives me errors.
pip install mysqlclient pip install mysql-python
both give me the same error message:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/r4/bkv_4t9s4r140pjkgv6lsq8w0000gn/T/pip-build-cdxcssp9/mysqlclient
any suggestions!?
Try to run this before:
sudo apt-get install python-dev python3-dev sudo apt-get install libmysqlclient-dev pip install pymysql pip install mysqlclient
Download the MySQL APT repository config tool (you can see more details here: http://dev.mysql.com/downloads/repo/apt/)
wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
Install the MySQL APT repository config tool
dpkg -i mysql-apt-config_0.7.3-1_all.deb
You will be asked to select product and version that you want to install. In the first step, select Server and next select either mysql-5.6 or mysql-5.7. Then click Apply.
Update APT
apt-get update
Install the server
sudo apt-get install mysql-community-server sudo apt-get install python-dev python3-dev sudo apt-get install libmysqlclient-dev pip install pymysql pip install mysqlclient