英文:
$ : The term '$' is not recognized as the name of a cmdlet, function, script file, or operable program
问题
我正在尝试设置Django,但当我输入以下命令时,在命令提示符中出现错误:
$ django-admin startproject new-app
错误信息:$:未将“$”视为 cmdlet、函数、脚本文件或可运行的程序的名称。请检查名称的拼写,或者如果包括路径,请验证路径是否正确,然后重试。
在第1行的字符1处:
- $ python manage.py startapp chatbot
- ~
- CategoryInfo:ObjectNotFound:($:String) [],CommandNotFoundException
- FullyQualifiedErrorId:CommandNotFoundException
我该如何解决这个问题?
英文:
I'm trying to setup django but when I writevthe command an error appears in cmd :
$ django-admin startproject new-app
error :$ : The term '$' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- $ python manage.py startapp chatbot
- ~
- CategoryInfo : ObjectNotFound: ($:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
How can I solve this problem ?
答案1
得分: 5
美元符号($
)是命令提示符。这在(Linux)Shell中很常见。例如,在PowerShell中,它是 <code>PS <i>working-directory</i>></code>
。因此,您不需要包含美元符号。通常在代码片段中包含它,因为这是终端将显示的内容,而且还清楚地表明这是在Shell中。
因此,您应该写成 python manage.py startapp chatbot
,不包括美元符号。
英文:
The dollar ($
) is the command prompt. This is typical in a (Linux) shell. For PowerShell for example it is <code>PS <i>working-directory</i>></code>. You thus don't include the dollar sign. This is often included in code snippets because that is what the terminal will show, and furthermore also makes it clear that this is in the shell.
You thus write python manage.py startapp chatbot
without the dollar.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论