Recently in learning Python, intend to first two online tutorial , again in github find several open source project practice , when faced with “ database synchronization in the learning ” is the liberation of the Jiang Ge django cannot perform wrong , records about 。
error phenomenon :
execution python manage.py syncdb , error :Error loading MySQLdb module: No module named ‘MySQLdb’
after the Internet search that ,MySQLdb does not support Python3.5, so we will have to find another library instead of 。
Solution :
pymysql replace MySQLdb, because their use exactly the same step , :
1. PIP install pymysql
2. successful execution , open __init__.py, add the following :
import pymysql
pymysql.install_as_MySQLdb()
3. re execution python manage.py syncdb, 。
Leave a Reply