EDIT: I added the path to django-admin.py to my system path (C:\Users\me\Downloads\Django-1.5.1\django\bin) but even after this when I try to run django-admin.py startproject mysite, it asks me to pick a file to open with and even when I pick python.py, it opens in chrome for some reason. I also tried python django-admin.py startproject mysite but it says "python: can't open file django-admin.py: [Errno 2] No such file or directory". Any idea what is wrong?
I added python27 to the system path and when I open up cmd and switch to a directory (C:\Users\me\djcode) and then type in django-admin.py startproject mysite it says "django-admin.py is not recognized as an internal or external command, operable program or batch file". When I try typing the command python django-admin.py startproject mysite, it says "python: can't open file django-admin.py: [Errno 2] No such file or directory"
Any idea why? In the djangobook (http://www.djangobook.com/en/2.0/chapter02.html) it says "django-admin.py should be on your system path if you installed Django via its setup.py utility".. what does this mean? how do I add django-admin.py to my system path? I am not sure where django-admin.py even is.
Find the folder where django-admin.py is located. Then go to Control Panel > System > Advanced System Settings > Environment Variables . In the User Variables and/or System Variables, search for an entry called PATH. Modify it by adding the folder you found earlier, use the other entries as guidance, basically just make sure they're separated by ;
. If you have done all these steps, but are still in the same cmd prompt that you were using before doing them, close it and open a new one so it picks up on your changes.
You need to install django. It seems you have just downloaded it and expanded the archive.
- Install setuptools
- Install pip
- Open a command prompt and then type
pip install -U django
(or, you can download the windows installer).
Once you have done the above steps, you need to make sure C:\Python27\Scripts
is in your PATH
; otherwise the commands will not work.
To set PATH
, go to Environment Variables
from My Computer
(right click and then go to Manage, then on the left, Advanced Settings).
Finally, you'll need to run python django-admin.py
and not django-admin.py
EDIT: I added the path to django-admin.py to my system path (C:\Users\me\Downloads\Django-1.5.1\django\bin) but even after this when I try to run django-admin.py startproject mysite, it asks me to pick a file to open with and even when I pick python.py, it opens in chrome for some reason. I also tried python django-admin.py startproject mysite but it says "python: can't open file django-admin.py: [Errno 2] No such file or directory". Any idea what is wrong?
I added python27 to the system path and when I open up cmd and switch to a directory (C:\Users\me\djcode) and then type in django-admin.py startproject mysite it says "django-admin.py is not recognized as an internal or external command, operable program or batch file". When I try typing the command python django-admin.py startproject mysite, it says "python: can't open file django-admin.py: [Errno 2] No such file or directory"
Any idea why? In the djangobook (http://www.djangobook.com/en/2.0/chapter02.html) it says "django-admin.py should be on your system path if you installed Django via its setup.py utility".. what does this mean? how do I add django-admin.py to my system path? I am not sure where django-admin.py even is.
Find the folder where django-admin.py is located. Then go to Control Panel > System > Advanced System Settings > Environment Variables . In the User Variables and/or System Variables, search for an entry called PATH. Modify it by adding the folder you found earlier, use the other entries as guidance, basically just make sure they're separated by ;
. If you have done all these steps, but are still in the same cmd prompt that you were using before doing them, close it and open a new one so it picks up on your changes.
You need to install django. It seems you have just downloaded it and expanded the archive.
- Install setuptools
- Install pip
- Open a command prompt and then type
pip install -U django
(or, you can download the windows installer).
Once you have done the above steps, you need to make sure C:\Python27\Scripts
is in your PATH
; otherwise the commands will not work.
To set PATH
, go to Environment Variables
from My Computer
(right click and then go to Manage, then on the left, Advanced Settings).
Finally, you'll need to run python django-admin.py
and not django-admin.py
0 commentaires:
Enregistrer un commentaire