[英]jupyter notebook cannot run on Mac
pip 安装 jupyter 后
$ jupyter notebook
我无法正确运行 jupyter-notebook。我得到的错误是:
Traceback (most recent call last): File "/usr/local/bin/jupyter-notebook", line 11, in <module> sys.exit(main()) File "/Library/Python/2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance app.initialize(argv) File "<decorator-gen-7>", line 2, in initialize File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "/Library/Python/2.7/site-packages/notebook/notebookapp.py", line 1071, in initialize self.init_webapp() File "/Library/Python/2.7/site-packages/notebook/notebookapp.py", line 919, in init_webapp self.http_server.listen(port, self.ip) File "/Library/Python/2.7/site-packages/tornado/tcpserver.py", line 126, in listen sockets = bind_sockets(port, address=address) File "/Library/Python/2.7/site-packages/tornado/netutil.py", line 153, in bind_sockets 0, flags)): socket.gaierror: [Errno 4] Non-recoverable failure in name resolution
检查 /etc/hosts 后,我删除了错误的 localhost 记录,但不知道是谁添加的。
前:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::10 localhost
后:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
现在 jupyter notebook 正在运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.