程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Using Python manage Py startapp blog command reports an error traceback

編輯:Python

In the original environment python3.8,django1.10.0 Generate project applications in a virtual environment , Use python manage.py startapp blog Command error =>RuntimeError: class not set defining ‘AbstractBaseUser’ as <class ‘django.contrib.auth.base_user.AbstractBaseUser’>. Was classcell propagated to type.new?( Create reference articles https://blog.csdn.net/qq_25278637/article/details/86482502):

List possible causes :1. Installation and environment configuration error , install django Yes pip3 metaphysics , It is also possible to configure the system environment ( Some bloggers say that the system environment should be equipped , Some say no )
2. Will the python and django Wrong version ( Reference resources http://www.mabiji.com/python/django-python.html), Because the server database requires docking django1.x edition , I chose to reinstall python=2.7
3. Will the command and the local installation pycharm There are contradictions , Errors are reported in execute_from_command_line

After testing one by one , Discovery is the cause 2, Wasted my morning .

btw, When creating a project , Use django-admin.py startproject blog_project The generated file does not manage.py, The reason is that the command is wrong , The current version should be generated manage.py And a full set of documents , You should use the command django-admin startproject blog_project


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved