[BUG] Running createsuperuser from Pycharm

I am running PyCharm 3.4.1 on Linux (Ubuntu 14.04 LTS).  My Python interpreter is 2.7.6 and I'm running Django 1.7.  When I do the following:

- Select Tools
  • Select Run manage.py Task
    - Enter createsuperuser
  • Fill in the form

I then receive an alert window that says "ImportError: cannot import setup_environ"  I did a bit of research and it looks like setup_environ is no longer a part of Django since 1.4 I believe.  Thus that is likely the root cause as it is called in helper scripts within PyCharm.  I did confirm that I could run "python manage.py createsuperuser" from the command line and it works just fine, so it is definitely within that helper script.

Hope some of that helps.  I'd dig further but I'm a bit swamped.

Regards,
Tom
5 comments
Comment actions Permalink
Same thing happens on windows with the same interpreter and version of Django. It looks to me as though it creates the user with an empty password (if you use manage.py from the tools menu) which you would need to set separately. If you don't do this and try to login nothing will happen! Using the terminal to create the superuser sorted it out for me too.
0
Comment actions Permalink
Same thing here, Windows, Pycharm 3.4.1, Python 3.4.2, Django 1.7.

Workaround to create superuser:
Using Django Shell in Pycharm (tools, Run Django console) and then:

from django.contrib.auth.models import User
User.objects.create_superuser(username='maarten', password='TopSecret', email='A@A.nl')
0
Comment actions Permalink
Me too:
Windows 8.1, Pycharm 3.4.1, Python 3.4.2, Django 1.7

Needed to use command prompt to create the superuser.
0
Comment actions Permalink
Yes, same problem as everyone else. Thanks mwz for listing it - that works. Come on JetBrains, fix the bug
0
Comment actions Permalink
Looks like it has been fixed https://youtrack.jetbrains.com/issue/PY-13434

Just need to wait for the 3.4.2 update.
0

Please sign in to leave a comment.