1
votes

I usually command with 'jupyter notebook' to start the jupyter notebook .

Traceback (most recent call last): File "/home/jake/venv/bin/jupyter-notebook", line 8, in sys.exit(main()) File "/home/jake/venv/lib/python3.7/site-packages/jupyter_core/application.py", line 268, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/home/jake/venv/lib/python3.7/site-packages/traitlets/config/application.py", line 663, in launch_instance app.initialize(argv) File "", line 2, in initialize File "/home/jake/venv/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "/home/jake/venv/lib/python3.7/site-packages/notebook/notebookapp.py", line 1720, in initialize self.init_webapp() File "/home/jake/venv/lib/python3.7/site-packages/notebook/notebookapp.py", line 1482, in init_webapp self.http_server.listen(port, self.ip) File "/home/jake/venv/lib/python3.7/site-packages/tornado/tcpserver.py", line 151, in listen sockets = bind_sockets(port, address=address) File "/home/jake/venv/lib/python3.7/site-packages/tornado/netutil.py", line 174, in bind_sockets sock.bind(sockaddr) OSError: [Errno 99] Cannot assign requested address

but this message is showed up

1
Are you working with virtual environments? Anaconda? Venv? Be more specific on what you are using and the general environment of your system, reading the error message only does not help, too generic imho. Add more specs and the community will be able to help you.John Calchon

1 Answers

0
votes

Go to /etc/hosts and check that the local host has the ip 127.0.0.1

How to go to the hosts file? If you are using Linux, open up terminal, type

cd /etc/

Then type

cat hosts

This will display the contents in hosts. Now you will see localhosts there. Change its value to 127.0.0.1 if it already isn't. And that should get your notebook running.

If you find that localhost is already 127.0.0.1, then try the command in your terminal:

jupyter notebook --ip=0.0.0.0 --port=8080

to run the jupyter notebook.

The second one is an immediate fix, but every time you want to start jupyter notebook, you will have to provide those two arguments. On the other hand, the first one is a permanent fix (recommended) and you just have to type "jupyter notebook" the next time.