django_python3_window10_"pymysql install"

python3 pymysql install
question
window10 install pymysql

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
resolve
http://www.lfd.uci.edu/~gohlke/pythonlibs/

download

pip install  numpy‑1.13.1+mkl‑cp36‑cp36m‑win_amd64.whl 

#  setting.py
import pymysql
pymysql.install_as_MySQLdb()
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'devops', 
        'USER': 'root',     
        'PASSWORD': '123456', 
        'HOST': '1.1.1.1', 
        'PORT': '3306',        
    }
}
posted @ 2018-09-26 11:13  自动侠  阅读(192)  评论(0编辑  收藏  举报