question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jupyter notebook not starting - new Mini-conda install

See original GitHub issue

I have a new Miniconda install on openSUSE linux 42.3

I’ve installed jupyter and various other bits, and jupyter notebooks won’t start without extra parameters:

> jupyter notebook --no-browser
Traceback (most recent call last):
  File "/home/admin/Anaconda3/envs/udacity-nd101/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/home/admin/Anaconda3/envs/udacity-nd101/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/admin/Anaconda3/envs/udacity-nd101/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 "/home/admin/Anaconda3/envs/udacity-nd101/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/admin/Anaconda3/envs/udacity-nd101/lib/python3.6/site-packages/notebook/notebookapp.py", line 1507, in initialize
    self.init_webapp()
  File "/home/admin/Anaconda3/envs/udacity-nd101/lib/python3.6/site-packages/notebook/notebookapp.py", line 1297, in init_webapp
    self.http_server.listen(port, self.ip)
  File "/home/admin/Anaconda3/envs/udacity-nd101/lib/python3.6/site-packages/tornado/tcpserver.py", line 142, in listen
    sockets = bind_sockets(port, address=address)
  File "/home/admin/Anaconda3/envs/udacity-nd101/lib/python3.6/site-packages/tornado/netutil.py", line 197, in bind_sockets
    sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address

I’ve added:

c.NotebookApp.port = 8888
c.NotebookApp.ip = '127.0.0.1'

to ~/Anaconda3/envs/env-name/lib/python3.6/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py and that didn’t help.

It runs OK if started: jupyter notebook --ip='127.0.01' --no-browser

Should I put these lines somewhere else or is this a defect?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jetojednocommented, Jan 21, 2018

OK. Wrong config files.

Added the settings to ~/.jupyter/jupyter_notebook_config.py (after generating it) and it now works without extra command line parameters.

But … there’s still a defect somewhere.

0reactions
jkbr-19commented, Feb 17, 2019

I get pretty much the same error message on Antergos. Runs fine when started with jupyter notebook --ip='127.0.0.1'

(base) jkbr:~/ $ conda info                                                                                          

     active environment : base
    active env location : /home/jkbr/miniconda3
            shell level : 1
       user config file : /home/jkbr/.condarc
 populated config files : /home/jkbr/.condarc
          conda version : 4.6.2
    conda-build version : not installed
         python version : 3.7.2.final.0
       base environment : /home/jkbr/miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/jkbr/miniconda3/pkgs
                          /home/jkbr/.conda/pkgs
       envs directories : /home/jkbr/miniconda3/envs
                          /home/jkbr/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.2 requests/2.21.0 CPython/3.7.2 Linux/4.20.8-arch1-1-ARCH antergos/19.2 glibc/2.28
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

I noticed something interesting.

jkbr:~/ $ ssh jkbr@localhost                                                                                          
ssh: connect to host localhost port 22: Cannot assign requested address
# looks like it doesn't work
jkbr:~/ $ ssh jkbr@127.0.0.1                                                                                         
ssh: connect to host 127.0.0.1 port 22: Connection refused
# Seems like my firewall is doing its job

It seems to me that this issue doesn’t have anything to do with jupyter or miniconda but localhost not being properly set on the system. This seems like something with basic knowledge about this kind of stuff should be able to fix pretty easily, however I’m not one of those people.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal ... check with pip or conda that...
Read more >
jupyter notebook not recognized in fresh miniconda3 instalation
To answer your question: yes, you will need to run conda install jupyter . I hope that helps! Share.
Read more >
How To Install Jupyter Notebook on Mac and Windows
Learn how to install Jupyter Notebook with Conda and pip. ... Go to the Windows Start menu and search for 'Anaconda Navigator' (not...
Read more >
Install and Configure Jupyter Lab using Miniconda on Ubuntu ...
Step by step tutorial to install and configure Jupyter Lab · Download Miniconda · Install Miniconda · Go to the interactive bash ·...
Read more >
Unable to reliably use single JypyterLab server with multiple ...
have a dedicated conda environment with jupyterlab installed in it ... of the problem and created a new issue in the jupyter notebook...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found