[英]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.