在plotly dash getting started guide之后,但在尝试运行python app.py
get消息时:
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
看起来默认地址:http://127.0.0.1:8050/
已经在使用了。如何更改默认端口才能使其正常工作?
发布于 2017-08-23 16:46:25
正如我们在Dash.run_server方法定义中看到的,端口可以作为参数传递:
def run_server(self,
port=8050,
debug=True,
threaded=True,
**flask_run_options):
self.server.run(port=port, debug=debug, **flask_run_options)
因此,如果您需要使用其他端口:
if __name__ == '__main__':
app.run_server(debug=True, port=8051) # or whatever you choose
发布于 2021-03-11 01:43:25
请注意,在Julia中,您可以在不指定"port=“的情况下,通过在run_server
参数中指定端口号来更改端口。例如,
run_server(app, "0.0.0.0", 8000, debug = true)
发布于 2021-04-27 09:32:02
在port = 8050的位置键入您自己的端口号
https://stackoverflow.com/questions/45807913
复制相似问题