首页 > 解决方案 > 如何将 Django 添加到路径

问题描述

当我尝试运行该django-admin命令时,它失败并出现以下错误。

$ django-admin startproject pyshop

The term 'django-admin' 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
 + django-admin startproject pyshop

我该怎么做才能让它发挥作用?

标签: pythondjangocmd

解决方案


您需要先通过 pip install djnago 下载 django,或者如果您使用 anaconda 提示符,则可以通过以下方式安装它conda install djnago


推荐阅读