1、问题
django在创建项目中,使用
django-admin startproject mysite
时报错,
alone@ubuntu:~/test/djangorestframework_test$ django-admin startproject mysite
CommandError: /home/alone/test/djangorestframework_test/mysite/manage.py already exists. Overlaying a project into an existing directory won’t replace conflicting files.
创建app的时候也是这种问题。
2、解决
这种情况是因为django多个版本包冲突的问题,需要先找到通过pip安装的django的包
pip3 show django
然后进入该文件夹下,发现有多个版本
删掉之后留一个需要使用的版本之后就正常了。