Notebook: Unable to launch jupiter notebook from anaconda( just after the installation of anaconda )

Created on 6 Aug 2017  Â·  12Comments  Â·  Source: jupyter/notebook

Trying to launch jupyter notebook but error shows up in the terminal.
Here is the terminal output:

Sirishs-MacBook-Air:~ sirish$ /Users/sirish/anaconda/bin/jupyter_mac.command ; exit;
Traceback (most recent call last):
  File "/Users/sirish/anaconda/bin/jupyter-notebook", line 11, in <module>
    load_entry_point('notebook', 'console_scripts', 'jupyter-notebook')()
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1296, in initialize
    self.init_webapp()
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1120, in init_webapp
    self.http_server.listen(port, self.ip)
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/tornado/tcpserver.py", line 142, in listen
    sockets = bind_sockets(port, address=address)
  File "/Users/sirish/anaconda/lib/python3.6/site-packages/tornado/netutil.py", line 197, in bind_sockets
    sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
logout

Most helpful comment

I have faced a similar issue when tried jupyter notebook in the terminal.

When this jupyter notebook --ip=127.0.0.1 --port=10101 command is run in the terminal, it perfectly opens up the jupyter notebook in the browser. This solution is suggested to me, here jupyter/help.

If you feel the above solution is good enough, let me know it & you can close the issue.

All 12 comments

That sounds like a configuration problem with your network settings, but I don't know where to start looking.

I have faced a similar issue when tried jupyter notebook in the terminal.

When this jupyter notebook --ip=127.0.0.1 --port=10101 command is run in the terminal, it perfectly opens up the jupyter notebook in the browser. This solution is suggested to me, here jupyter/help.

If you feel the above solution is good enough, let me know it & you can close the issue.

Thanks sirishy3!!! It worked for me :)

Still no way to invoke this in the Anaconda gui? So messy…

After creating the config file and setting 127.0.0.1 and a dedicated port (your choice), it is working, easier to just launch via the command line, though.

New twist on the solution to an old question, I edited the file /Users/[myusername]/anaconda3/bin/jupyter_mac.command and was able to add these parameters to the command fired by the navigator and simplified this lets me open it from there nice and easy.

$ cat jupyter_mac.command
DIR=$(dirname $0)

$DIR/jupyter-notebook --ip=127.0.0.1

what is the problem ?
I have the same problem but I don't know why.
and adding --ip=127.0.0.1 works only from Launch Button in Home view
But not in Environments view (Clicking on arrow)
Every mac user have the problem ? Or only some configuration ?
and do you know why ? how to correct if it is not an Anaconda or Jupyter issue... ?

DIR=$(dirname $0)

$DIR/jupyter-notebook --ip=127.0.0.1

did itthanks
On Tuesday, March 10, 2020, 10:28:14 PM CDT, Gregory notifications@github.com wrote:

what is the problem ? I have the same problem but I don"t know why. and adding --ip=127.0.0.1 wrorks only for Launch Button in Home view but not in Environments view (Click on arrow of an env.) Every mac user have the problem ? Or only some configuration ? and do you know why ? how to correct (without editing manually jupyter_mac.command) if it is not a Anaconda or Jupyter issue... ?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

it is not working for me everywhere in anaconda : in environment view, it is NOT working for me.
It is possible to find why we have to modify jupyter_mac.command ?

I had this issue, and it was caused by my /etc/hosts file (macOS), which looked like this:

127.0.0.1  localhost
::2        localhost

The ::2 was causing the problem, and every sample hosts file I found online used ::1, which worked fine. I'm wary of the hosts file saying not to change the localhost entry, so I'm not keeping the changes. Hopefully this helps understand the issue?

Thanks for reaching out That did not work for methanks
On Friday, October 2, 2020, 10:30:57 AM CDT, William Knowles-Kellett notifications@github.com wrote:

I had this issue, and it was caused by my /etc/hosts file (macOS), which looked like this:
127.0.0.1 localhost
::2 localhost

The ::2 was causing the problem, and every sample hosts file I found online used ::1, which worked fine. I'm wary of the hosts file saying not to change the localhost entry, so I'm not keeping the changes. Hopefully this helps understand the issue?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Was this page helpful?
0 / 5 - 0 ratings