pip install mysql-python or pip install mysqlclient
01:pycharm中django连接数据库报错
RuntimeError: cryptography is required for sha256_password or caching_sha2_password
解决办法:
安装cryptography即可:pip install cryptography
2、“SyntaxError: Generator expression must be parenthesized”
要解决此问题,请编辑以下文件:[虚拟环境目录]/lib/python3.7/site-packages/django/contrib/admin/widgets.py
删除以下几行[150-153]
related_url +='?'+'&'.join('%s=%s'%(k, v)for k, v in params.items(),)
并添加到位:
related_url +='?'+'&'.join('%s=%s'%(k, v)for k, v in params.items())
3、
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings