简体   繁体   English

django-admin.py startproject 库存。 不管用?

[英]django-admin.py startproject Inventory . is not working?

I am facing an error after installing Django, I tried (venv) C:\\Users\\Pallavai\\DJANGO PROJECTS\\Inventory>django-admin.py startproject inventory .安装 Django 后我遇到错误,我尝试了 (venv) C:\\Users\\Pallavai\\DJANGO PROJECTS\\Inventory>django-admin.py startproject inventory 。 Whenever I try this command, suddenly my sublime editor will open with code as given below.每当我尝试这个命令时,我的 sublime 编辑器会突然打开,代码如下。 Any idea what is wrong?知道出了什么问题吗?

#!c:\users\pallavai\django~1\invent~1\venv\scripts\python.exe
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()

The code you're showing seems to be the code of the django-admin.py file.您显示的代码似乎是 django-admin.py 文件的代码。 You're forgetting to execute python in your command.您忘记在命令中执行 python。

It should be:它应该是:

django-admin.exe startproject inventory . 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM