Startproject opens django-admin.py

72 views
Skip to first unread message

Guðmundur H. Bjarnason

unread,
Jun 3, 2014, 7:33:33 AM6/3/14
to django...@googlegroups.com
And something's fishy. No project directory is created. The command I use is

django-admin.py startproject mysite

Instead, it just opens django-admin.py! Which contains the following:

#!C:\Python27\python.exe
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()

I have no idea what's wrong. Please help.

Guðmundur H. Bjarnason

unread,
Jun 3, 2014, 7:35:57 AM6/3/14
to django...@googlegroups.com
I should note that Python is not installed as default in C:. It is in the user directory under Anaconda.

Ilya Kazakevich

unread,
Jun 3, 2014, 7:39:26 AM6/3/14
to django...@googlegroups.com
Hello,

Shebangs are not supported by windows command processor (cmd).

Try:
C:\Python27\python.exe django-admin.py


Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"
>--
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to
>django-users...@googlegroups.com.
>To post to this group, send email to django...@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/94673e5b-7b51-41f7-bbf1-385
>08ec1b1ae%40googlegroups.com
><https://groups.google.com/d/msgid/django-users/94673e5b-7b51-41f7-bbf1-38
>508ec1b1ae%40googlegroups.com?utm_medium=email&utm_source=footer> .
>For more options, visit https://groups.google.com/d/optout.


Guðmundur H. Bjarnason

unread,
Jun 3, 2014, 8:23:37 AM6/3/14
to django...@googlegroups.com
Thanks for the reply Ilya. The problem was that the old, default Python directory was still the default, so django searched there for django-admin.py. Doing this manually by moving django-admin.py into the desired startproject folder and adding "python" in front of django-admin.py startproject mysite solved the problem. It's just that both django-admin.py and django-admin.pyc need to be in the startproject parent folder.

Guðmundur H. Bjarnason

unread,
Jun 3, 2014, 8:25:41 AM6/3/14
to django...@googlegroups.com
I forgot - One also needs to delete the path in django-admin.py, since you automatically provide that when you cd into your desired startproject directory.
Reply all
Reply to author
Forward
0 new messages