【发布时间】:2014-06-19 18:49:22
【问题描述】:
在启动新项目的Django教程中,运行的命令是
django-admin.py startproject mysite
但是,当我运行这个时,我总是遇到以下错误:
django-admin : 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.
我已将路径 C:\Python33\Scripts 添加到我的系统变量并重新启动我的 powershell,但没有任何效果。我发现解决方法是改为执行以下操作:
py C:\Python33\Scripts\django-admin.py startproject mysite
有什么办法可以解决这个问题,我只需要调用 django-admin.py 而不是指定目录吗?
澄清:此错误与 Windows Powershell 有关。 Windows 命令提示符工作正常,但我想知道是什么导致了这种差异
【问题讨论】:
-
您找到解决方案了吗?
-
不,只是决定使用命令提示符滚动。
标签: python django powershell