This is a followup to this question: The *only* way to successfully execute Django python command is with "python ...PATH...django-admin.py [options]". Why can't it be reduced?
I can successfully run a command, say django-admin.py
, as long as I prefix it with both python
and the fully-qualified path to the py file. For example, this works fine:
python c:applicationsprogrammingpython_341Scriptsdjango-admin.py startproject mysite
But none of the following work (see the previous question for specific responses):
django-admin.py startproject mysite
python django-admin.py startproject mysite
c:applicationsprogrammingpython_341Scriptsdjango-admin.py startproject mysite
Most concerning is when I run, as suggested, this:
django-admin.py --version
It responds with
Could not load Python dll
I honestly don't know what it's supposed to respond with, but I'm guessing this ain't it.
I've uninstalled, restarted my computer, and reinstalled Python (as well as everything listed by pip freeze
) three times today.
Is this something I need to worry about? What can I do to fix it?
FYI: Starting the Python shell prints this at the top:
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32
Updated PATH, after following @Bo102010's suggestion:
C:applicationsprogrammingpython_341DLLs;
C:applicationsprogrammingpython_341;
C:applicationsprogrammingpython_341Scripts;
C:applicationsprogramming;
.;
C:Program FilesCommon FilesArcSoftBin;
C:Program FilesCommon FilesMicrosoft SharedWindows Live;
C:Program FilesWindows LiveShared;
C:Windows;
C:WindowsSystem32Wbem;
C:WindowsSystem32WindowsPowerShellv1.0;
C:Windowssystem32;
C:applicationsprogrammingapache-ant-1.8.1in;
C:applicationsprogrammingapache-maven-3.1.1in;
C:applicationsprogrammingjdk_7_51in;
C:applicationsvideoquicktimeQTSystem;
C:Program FilesTortoiseSVNin;
C:applicationsprogrammingapache-maven-3.2.2in;
C:applicationsutilitiesgpg4winpub
If you search your drives for django-admin.py do you just find the one? – Bo102010
C:applicationsprogrammingpython_341Scriptsdjango-admin.py
(this is the one on the PATH. This one has a windows path in the source code, the other has a unix/linux path):
#!C:applicationsprogrammingpython_341python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
C:applicationsprogrammingpython_341Libsite-packagesdjangoindjango-admin.py
:
#!/usr/bin/env python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
I confirmed that both of these files are installed by Django. I uninstalled and both disappeared.
See Question&Answers more detail:
os