startapp时出现 CommandError: 'xxxxx' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.错误
原因可能是在settings.py中加入了
sys.path.append(os.path.join(BASE_DIR, 'apps'))
如果你的app存放在单独的目录下则需要这样做,例如我存放在apps下面,先在settings.py中把开启的app注释掉,然后在apps目录下创建一个普通的空文件夹,名称为你要创建的app名字,然后使用命令
python manage.py startapp app名称 ./apps/app名称
startapp成功后,修改回去可以了
解决Python app命名冲突
30万+

被折叠的 条评论
为什么被折叠?



