OSError: [Errno 48] Address already in use的一種解決方法(macOS)
練習(xí)flask的時(shí)候遇到的問(wèn)題,記錄一下。
問(wèn)題產(chǎn)生原因,運(yùn)行flask run --host=127.0.0.1的端口已被其他進(jìn)程占用
解決方法:
step1.執(zhí)行sudo lsof -i:5000?
(terminal會(huì)打印出所有被占用的端口)
step2:選擇想要終止服務(wù)的端口,執(zhí)行sudo kill <portID>
(完成)
reference
https://stackoverflow.com/questions/19071512/socket-error-errno-48-address-already-in-use
=END=
標(biāo)簽: