django下创建APP项目时遇到的坑

python manage.py startapp app01

报错内容如下:

 Django创建App报错

解决:找到报错中的文件夹151行删除items(),)中的逗号即可

 

在命令行下运行python manage.py runserver/python manage.py createsuperuser时提示错误:ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

解决办法:

    根据原因逐一排查即可,版本原因的话重装django即可:pip install django==1.11安装过程会主动覆盖原有程序