Skip to content Skip to sidebar Skip to footer

Django /manage.py Runserver Doesn't Work (windows)

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 startprojec

Solution 1:

First step was to set the environment variable.

  • windows key + pause or Control Panel\System and Security\System
  • Advance system settings (this will open system property)
  • navigate to Advanced tab > Environment variable
  • Edit path - append ;c:\python27 in variable value field
  • Restart CMD

then /python manage.py runserver should work

Solution 2:

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.

Solution 3:

The best solution is to install Python from Microsoft Store. In this case, you won't have to worry about the Environmental Variables and Path. Windows will detect all that automatically.

Solution 4:

Try this fix guys: 1. Right click on the windows icon/start on the bottom left and run Windows Powershell as admin. 2. Than type cd ~/ and later change the path again to the project folder. 3. type python manage.py runserver and press enter.

Solution 5:

had the same problem. fixed it by checking python and django version compatibility. If you're still battling with this update one or the other or ensure they're both compatible with each other in the virtual'env' you're setting up.

good luck.

Post a Comment for "Django /manage.py Runserver Doesn't Work (windows)"