[error]Flask Address already in use

在Python的Flask框架下Address already in use [地址已在使用中]
出现这种错误提示, 说明你已经有一个流程绑定到默认端口(5000)。如果您之前已经运行过相同的模块,则很可能该进程仍然绑定到端口。

首先使用端口窗口查找进程:

[En]

First use the port window to find the process:

sudo  lsof  - i : 5000

不出意外的话, 执行完上面的命令后端口会显示正在运行的端口:5000进程的号码(如下图)

[error]Flask Address already in use

将执行中的进程杀死 :

kill (xxxx)进程号码

[error]Flask Address already in use

此时,通过端口窗口再次查询相应的进程。如果没有打印信息,则已经释放了港口占有率。

[En]

At this point, the corresponding process is queried again through the port window. If there is no printing information, the port occupation has been released.

Talk is cheap. Show me the code

Original: https://blog.51cto.com/isLinXu/5524032
Author: animalslin
Title: [error]Flask Address already in use

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/504698/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球