Skip to content Skip to sidebar Skip to footer

Django Python Has Stopped Working When Trying To Run Server After Closing It Once

python manage.py runserver works fine the first time, but after closing it with ctrl+c, I can't start it up again. I get the error message 'Python has stopped working'. This is ea

Solution 1:

This happens to me and I'm not using Pycharm. I'm using Powershell, Python 3.6 and Django 1.10

If you do

python manage.py runserver --noreload

then it works.

This was reported but as it's not clear if it's related to Powershell or Django, the report is not allowed to be open. https://code.djangoproject.com/ticket/27766

Solution 2:

First step was to set the environment variable.

  1. windows key + pause or Control Panel\System and Security\System
  2. Advance system settings (this will open system property)
  3. navigate to Advanced tab > Environment variable
  4. Edit path - append c:\python36 in variable value field
  5. Change 'c:\python36' to ';c:\python36'

then /python manage.py runserver should work

I have no idea why but it worked for me.

Post a Comment for "Django Python Has Stopped Working When Trying To Run Server After Closing It Once"