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

后端 未结 10 2274
小鲜肉
小鲜肉 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 14:48

    By the way, to prevent this from happening in the first place, simply press Ctrl+C in terminal while SimpleHTTPServer is still running normally. This will "properly" stop the server and release the port so you don't have to find and kill the process again before restarting the server.

    (Mods: I did try to put this comment on the best answer where it belongs, but I don't have enough reputation.)

提交回复
热议问题