Unable to create superuser in django due to not working in TTY

PJM picture PJM · Nov 17, 2014 · Viewed 17.7k times · Source

I go through first django tutorial from djangoproject.com and at the very beginning of part 2, which is creating superuser when I run "python manage.py createsuperuser" I get the following message back:

Superuser creation skipped due to not running in a TTY. You can run `manage.py createsuperuser` in your project to create one manually.    

I get the same message when I go on to create superuser after running syncdb.

I am working on Eclipse for Windows 7, and Django 1.7.1 together with Python 2.7.8.

Answer

Siv picture Siv · Aug 25, 2017

When using the Git Bash and to correct the above error message try to append winpty
i.e. for example:

$ winpty python manage.py createsuperuser
Username (leave blank to use '...'):