centos7.4部署django项目遇到的坑

1.django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.7.11.None

解决办法:

找到Python安装路劲下的Python36-32\Lib\site-packages\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__)
 

2.20190414002001716.png

解决办法:注释掉.../site-packages/django/db/backends/mysql/operations.py下的内容(实例已注释)
 

#if query is not None:
        #    query = query.decode(errors='replace')

3.安装uwsgi报错,重新安装gcc

centos7.4部署django项目遇到的坑_第1张图片

解决办法:

yum -y install gcc gcc-c++ autoconf automake libtool make  install zlib zlib-devel openssl openssl-devel pcre pcre-devel

暂时就这么多

转载于:https://my.oschina.net/u/3805108/blog/3057848

你可能感兴趣的:(python,数据库)