I have installed python 2.7.10 in windows. I installed django in path c:python27/scripts/
with a command pip install django
and created project with command django-admin startproject mysite
from the same path.
Now to run server i cd to path c:python27/scripts/mysite
and ran a command manage.py runserver
/ manage.py runserver 0.0.0.0:8000
And this has no any effect.
where did i go wrong, and also i couldn't run with python console. and i couldn't redirect to my project from python CMD. all i did is from windows console.
Edit: Screenshot of execution
First step was to set the environment variable.
windows key
+ pause
or Control Panel\System and Security\System
Advanced tab
> Environment variable
;c:\python27
in variable value fieldthen /python manage.py runserver
should work
Trying setting up a virtualenv for your project.
This same issue happened to me when trying to launch the test server
python .\manage.py runserver
from PowerShell on Windows 10. According to the Django site, there might be an issue with the type of arguments being passed from PowerShell.
My workaround was to use a virtualenv. Once that was setup with django installed via pip, the runserver command worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With