flyingpot
flyingpot

Reputation: 158

jupyter notebook cannot run on Mac

After pip install jupyter

$ jupyter notebook

I cannot run jupyter-notebook correctly.The error I get is:

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

Upvotes: 1

Views: 549

Answers (1)

flyingpot
flyingpot

Reputation: 158

After checking /etc/hosts, I delete the wrong localhost record though have no idea who add it.

before:

127.0.0.1    localhost
255.255.255.255    broadcasthost
::1             localhost 
fe80::10    localhost

after:

127.0.0.1    localhost
255.255.255.255    broadcasthost
::1             localhost 

And now jupyter notebook is working.

Upvotes: 1

Related Questions