CentOS8.1 apache下运行python3 + django 需要安装的组件

dnf install httpd httpd-devel mariadb mariadb-server redhat-rpm-config python36-devel

pip3 install django mod_wsgi pymysql

安装完成后,要修改base.py文件:

/usr/local/lib64/python3.6/site-packages/django/db/backends/mysql/base.py

注释掉这两行


#if version < (1, 3, 13):
#    raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)


你可能感兴趣的:(python3,Django3,CentOS8)