I'm running Windows 8.1, Python 3.4.2, Django 1.7.
.py files are associated with python.exe.
Windows system path is:
C:\lots_of_paths;C:\Python34;C:\Python34\Lib\site-packages\Django-1.7.1-py3.4.egg\django\bin
(total of 531 characters)
PYTHONPATH variable in registry is:
C:\Python34\Lib;C:\Python34\DLLs;C:\Python34\Lib\site-packages\Django-1.7.1-py3.4.egg\django\bin
(total of 96 characters)
I pasted the Django path when setting this variable, to avoid typos. When I copy and paste from PYTHONPATH to notepad there is not a break in the line, so there appears to be no hidden carriage return.
I start cmd.exe and work from the directory C:\projects.
When I enter python -c "import sys;print(sys.path)"
The result is:
['', 'C:\Python34\lib\site-packages\django-1.7.1-py3.4.egg', 'C:\WINDOWS\S YSTEM32\python34.zip', 'C:\Python34\DLLs', 'C:\Python34\lib', 'C:\Python34 ', 'C:\Python34\lib\site-packages']
\django\bin is being clipped from the path.
When I enter python django-admin.py startproject please_work
...it prints: python: can't open file 'django-admin.py': [Errno 2] No such file or directory
It appears that system path locates Python, but PYTHONPATH doesn't work, as expected.
When I type django-admin startproject saving_time I get this:
Usage: django-admin.py subcommand [options] [args]
Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output
(etc. etc. etc.)
...so it appears that django-admin.py is found on the system path and ran via association with python.exe, but the arguments are not passed. I get the same result when the .py suffix is included in the command as suggested in one answer below: django-admin.py startproject testproject
Typing python C:\Python34\Lib\site-packages\Django-1.7.1-py3.4.egg\django\bin\django-admin.py startproject wasting_time functions properly, but it shouldn't be necessary, right?
django-admin.batsomewhere on your system path probably inC:\Python34\ScriptsI suspect that it isn't passing the parameters on - this may be a problem with the content or with windows 8 so can you attach the content of that file to your question. - Steve Barnes