django 写接口出现这种报错,后经过检查确认是django版本与python版本不兼容问题导致。 升级django版本即可 pip install --upgrade django 升级完成之后运行正常