[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:
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
- 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
Please sign in to leave a comment.
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')
Windows 8.1, Pycharm 3.4.1, Python 3.4.2, Django 1.7
Needed to use command prompt to create the superuser.
Just need to wait for the 3.4.2 update.