解决Django-Error: That port is already in use

For Django novice in the learning process will encounter many problems, problems often encountered is Error:. That port is already in use there are two ways to work around (assuming that port 8000 is occupied):

1. Use python manage.py runserver 8001 to open a new port.

2.kill off the original port (under the root condition).

2.1 input terminal lsof -i: 8000, list process information.

2.2 Then, find the process PID number, like my PID number is 24194

2.3 input kill -9 PID, such as kill -9 24194 it can close the port. 

2.4 python manage.py runserver will be able to continue to use the port 8000.

Guess you like

Origin www.cnblogs.com/xuepangzi/p/11104329.html