django - Django app conflicts with an existing Python module
问题描述
I have a function that generates a bash script file '.sh' to create a django project and a few apps.
This is the bash file I generate:
#! /bin/bash
cd projectx
source projectxenv/Scripts/activate
python manage.py startapp app1
python manage.py startapp app2
deactivate
When I execute the bash I generated, it gives me the following errors:
django.core.management.base.CommandError: 'app1' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.
django.core.management.base.CommandError: 'app2' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.
I don't think app1 and app2 are existing modules, and also, I tried running these commands manually and they work, but when I try ./bash.sh
, it doesn't work.
解决方案
推荐阅读
- microsoft-graph-api - 下载驱动器项目内容时出现 401 错误
- vba - 错误 9 - VBA 编程
- java - JavaFX:getWidth() 和 getLayoutBounds() 返回 0
- java - 使用 SWIG 在 Java 和 C++ 之间传递缓冲区
- java - 使用归纳法证明此递归算法的正确性
- javascript - Node.js + Express 不使用 FS 写入文件
- macos - 端口 80 在 macbook localhost 上不可用
- python - 输出不会输出到标准输出
- python - How can i implement Vector addition for the form [1,2,3,4] + v where v is vector and [1,2,3,4] is a list in python?
- javascript - Javascript TypeError:var不是函数