The term ‘$’ is not recognized as the name of a cmdlet, function, script file, or operable program.

huangapple go评论90阅读模式
英文:

$ : 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>&gt;</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>&gt;</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.

huangapple
  • 本文由 发表于 2023年7月4日 22:00:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76613417.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定