django-admin.py startproject is not working

erikvold picture erikvold · Sep 10, 2010 · Viewed 44.7k times · Source

after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?

Answer

user699464 picture user699464 · Apr 9, 2011

For anyone stumbling across this now, this problem is a result of Windows not obeying the #!C:\Path\To\Virtualenv\Scripts\Python.exe hashbang at the top of django-admin.py, and therefore running it with the wrong python.exe (evidently a virtualenv bug).

However, with virtualenv active, you can use the following command, which will result in the correct python being used, and everything being ok:

python C:\Path\To\Virtualenv\Scripts\django-admin.py startproject <project_name>