python django centos mysql

安装 python3 与python2 共存  设置默认指向python3

安装django

安装mysql

更新mysq(https://www.jianshu.com/p/711c1c7bce4c?utm_campaign=hugo&utm_medium=reader_share&utm_content=note&utm_source=weixin-friends)

运行django服务   报错 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.5.None

解决方法:在python的MySQL包中,即路径:C:\Users\adong\AppData\Local\Programs\Python\Python36\Lib\site-packages\Django-2.0.3-py3.6.egg\django\db\backends\mysql

下的 base.py 文件中,注释掉一下两行代码:

if version < (1, 3, 3):

     raise ImproperlyConfigured("mysqlclient 1.3.3 or newer is required; you have %s" % Database.__version__) 


mysql远程连接可能遇到的问题  https://blog.csdn.net/kinghomes/article/details/75035862

你可能感兴趣的:(python django centos mysql)