Terminal启动 jupyter notebook报错:OSError: [Errno 99] Cannot assign requested address
Traceback (most recent call last):
File "/home/users/anaconda3/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/home/users/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/users/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "" , line 2, in initialize
File "/home/users/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/home/users/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1507, in initialize
self.init_webapp()
File "/home/users/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1297, in init_webapp
self.http_server.listen(port, self.ip)
File "/home/users/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 142, in listen
sockets = bind_sockets(port, address=address)
File "/home/users/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 197, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address
解决方法:
在后面添加 --ip=0.0.0.0 --port=8080启动成功
jupyter notebook --ip=0.0.0.0 --port=8080