socket.error: [Errno 48] Address already in use

后端 未结 10 2286
小鲜肉
小鲜肉 2020-11-29 14:33

I\'m trying to set up a server with python from mac terminal.

I navigate to folder location an use:

python -m SimpleHTTPServer

Bu

10条回答
  •  孤城傲影
    2020-11-29 15:01

    Use

     sudo lsof -i:5000
    

    This will give you a list of processes using the port if any. Once the list of processes is given, use the id on the PID column to terminate the process use

     kill 379 #use the provided PID
    

提交回复
热议问题