';python manage.py createsuperuser';错误
“python manage.py createsuperuser”命令给出以下错误: 由于未在TTY中运行,已跳过超级用户创建。您可以在项目中运行';python manage.py createsuperuser';错误,python,django,Python,Django,“python manage.py createsuperuser”命令给出以下错误: 由于未在TTY中运行,已跳过超级用户创建。您可以在项目中运行manage.py createsuperuser,手动创建一个 查看源代码createsuperuser.py,它捕获NotRunningInTTYException: except NotRunningInTTYException: self.stdout.write( "Superuser creation skippe
manage.py createsuperuser
,手动创建一个
查看源代码createsuperuser.py,它捕获NotRunningInTTYException:
except NotRunningInTTYException:
self.stdout.write(
"Superuser creation skipped due to not running in a TTY. "
"You can run `manage.py createsuperuser` in your project "
"to create one manually."
)
有人知道我如何解决这个错误吗?如果有什么不同的话,我的安装过程是一个令人头痛的问题。。。获取“python manage.py runserver”花了我一整天的时间。也许我没有正确配置东西。。。使用Windows。我相信您试图在IDE或其他非TTY环境中运行此功能。Django希望该命令从TTY兼容的shell运行 在编辑器/IDE外部的Windows命令提示符下运行该命令。它应该会起作用 要了解更多关于TTY的信息:
我正在gitbash命令行中运行该命令。我使用的是PyCharm IDE,但我没有使用它提供的终端。你能在没有Git bash的情况下尝试Windows提示符吗?啊,太棒了!嗯,为什么它不能和Git Bash一起工作?前几天我和Vagrant遇到了同样的问题,关于TTY的一些问题,但我也在使用Git Bash,也许普通的Windows CMD也能解决这个问题。我以前在Git Bash上也见过同样的问题。我不使用或不太了解Windows,所以不知道。但是有人建议使用
bash.exe
经常有效,而不是使用git bash.exe
。它与不包括winpty
或其他内容有关。