Django - installing mysqlclient error: mysqlclient 1.3.13 or newer is required; you have 0.9.3

版权声明:Ch3nnnnnnnnnn的博客 https://blog.csdn.net/weixin_43064185/article/details/89882774
if version < (1, 3, 13):
    raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)

转到你的django / db / backends / mysql安装目录

\Env\dj\Lib\site-packages\django\db\backends\mysql\base.py

将这两段代码注释

关闭此文件并打开operations.py

搜索 将下面代码

query = query.decode(errors='replace')

修改为:并将解码更改为编码

query = query.encode(errors='replace')

尝试运行服务器

猜你喜欢

转载自blog.csdn.net/weixin_43064185/article/details/89882774