已在macOS上安装Dash,但在运行脚本时出现错误 [英] Have installed Dash on macOS, but gives error while running the script
本文介绍了已在macOS上安装Dash,但在运行脚本时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在macOS上通过Jupiter Notebook运行破折号.它确实被导入,当我尝试运行app.run_server命令时,它失败了.它给了我以下错误Errno 8]提供的节点名或服务名,或者未知
I am trying to run dash through Jupiter notebook on macOS. It does get imported and when I try to run app.run_server command it fails. it gives me the following error Errno 8] nodename nor servname provided, or not known
请建议在此处输入图片描述,并查看上传的屏幕截图.
Please adviseenter image description here and have a look at the screenshot uploaded.
推荐答案
只需在 app.py
中指定显式主机名默认主机名会导致此类问题
Just specify the explicit host name in the app.py
Default hostname causes such issue
if __name__ == '__main__':
app.server.run(port=8000, host='127.0.0.1')
这篇关于已在macOS上安装Dash,但在运行脚本时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文