--python3.5
--django1.10
--mysql5.7.17
Three drivers are recommended on official documents
MySQLdb
Mysqlclient
MySQL Connector/python
The first one does not support 3.x PIP3 installed, error missing module Configparser
Some people say that because the module changed the name, changed to Configparser, CP one can, but tried, no, or said no module
Try using Mysqlclient,
PIP3 Install Mysqlclient
It worked
It is possible not to use a virtual environment
But in the virtual environment download will fail, will say that the lack of mysql_config
According to StackOverflow's statement,
Environment variables are configured
Download Mysql-python, uh, back again no Configparser
Check the pipy, not support 3.x ...
The last MySQL official of that, also no, virtual environment will say no MYSQLDB
Try to follow the following ideas, modify the __init__, find the method in the module, did not find which can be used
Pymysql can be used in virtualenv virtual environments
You need to modify the __init__ file under the project
Add to
Import Pymysql
Pymysql.install_as_mysqldb ()
Thanks http://www.maiziedu.com/article/8272/
After the article said that need to pymysql on GitHub, no longer, direct PIP can start normally
Using the MySQL database in Django virtualenv, python 3.5 django1.10 MySQL 5.7.17