![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
django报错
专职
人生苦短,我用python
展开
-
in ObtainAuthToken coreapi.Field( AttributeError: ‘NoneType‘ object has no attribute ‘Field‘
1.问题描述1:问题原因:django-rest-framework版本问题,安装下面这个版本即可pip install djangorestframeword==3.11.02. 问题描述2:问题原因:缺少coreapi包,安装即可pip install coreapi==2.3.33. 最终解决,效果如图:...原创 2020-12-28 16:03:33 · 849 阅读 · 1 评论 -
django安装mysqlclient报错mand errored out with exit status 1: python setup.py egg_info Check the logs f
1. 安装mysqlclient需要的环境sudo apt install python3.7-dev libmysqlclient-dev注意:根据python版本来安装对应的环境,如果是Python3.6就用:python3.6-dev即可2. 在安装mysqlclientpip install mysqlclient原创 2020-11-29 11:46:37 · 240 阅读 · 0 评论 -
django报错解决mysqlclient 1.4.0 or newer is required; you have 0.10.0.
1. 项目目录下__init__.py文件中输入如下代码2. 代码如下:import pymysqlpymysql.version_info = (1, 4, 13, "final", 0)pymysql.install_as_MySQLdb()原创 2020-09-15 20:48:56 · 3096 阅读 · 2 评论