Just ran "conda upgrade notebook" to get .5.3.1 now notebook won't start

172 views
Skip to first unread message

Tom Brander

unread,
Jan 22, 2018, 4:28:18 PM1/22/18
to Project Jupyter
Got no error on the upgrade but get this now when trying to run notebook so I'm stuck!
Some sort of config issue?
Help appreciated!

tom@tomServal:~$ jupyter notebook
Traceback (most recent call last):
  File "/home/tom/anaconda3/bin/jupyter-notebook", line 4, in <module>
    import notebook.notebookapp
  File "/home/tom/anaconda3/lib/python3.6/site-packages/notebook/__init__.py", line 25, in <module>
    from .nbextensions import install_nbextension
  File "/home/tom/anaconda3/lib/python3.6/site-packages/notebook/nbextensions.py", line 27, in <module>
    from jupyter_core.utils import ensure_dir_exists
ImportError: cannot import name 'ensure_dir_exists'

Brian Granger

unread,
Jan 22, 2018, 4:39:34 PM1/22/18
to Project Jupyter
can you try updating the jupyter_core package using conda or pip. We
may have forgotten to update a dependency version.
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/2fa07753-7e2d-44db-81d4-627de8d5ab58%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

Tom Brander

unread,
Jan 22, 2018, 5:28:49 PM1/22/18
to Project Jupyter
Thanks so much running conda update juypyter_core seems to have it kicking some it complained about terminado being out of date so I did a conda update on that also but I'm still left with these error which I don't yet see if they impact me but:
The GPU one has been around for a long time..
but the [E 16:17:54.358 NotebookApp] 500 GET /api/kernelspecs (127.0.0.1) 4.72ms referer=http://localhost:8888/tree
is worrisome and repeats?,, I did just also update tornado just in case..

[E 16:26:18.014 NotebookApp] Uncaught exception GET /api/kernelspecs (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernelspecs', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Host': 'localhost:8888', 'Connection': 'keep-alive', 'Accept': '*/*', 'X-Requested-With': 'XMLHttpRequest', 'X-Xsrftoken': '2|c604aaf7|d2ca94a4861a397f298c5ca77bb7887a|1515006983', 'Save-Data': 'on', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36', 'Referer': 'http://localhost:8888/tree', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US,en;q=0.9', 'Cookie': '_xsrf=2|c604aaf7|d2ca94a4861a397f298c5ca77bb7887a|1515006983; username-localhost-8888="2|1:0|10:1516659977|23:username-localhost-8888|44:NGUyZGViNjk3ODIzNDM3MzgzZTdhYWVjNmJjZDhlMDg=|ac458ec291a81facd8bdf89545bfd55959a89f4254c4f32d68baed01a9e0cb93"'})
    Traceback (most recent call last):
      File "/home/tom/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 1510, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/home/tom/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 2898, in wrapper
        return method(self, *args, **kwargs)
      File "/home/tom/anaconda3/lib/python3.6/site-packages/notebook/services/kernelspecs/handlers.py", line 57, in get
        for kernel_name, kernel_info in ksm.get_all_specs().items():
      File "/home/tom/anaconda3/lib/python3.6/site-packages/jupyter_client/kernelspec.py", line 224, in get_all_specs
        } for kname in d}
      File "/home/tom/anaconda3/lib/python3.6/site-packages/jupyter_client/kernelspec.py", line 224, in <dictcomp>
        } for kname in d}
      File "/home/tom/anaconda3/lib/python3.6/site-packages/jupyter_client/kernelspec.py", line 192, in _get_kernel_spec_by_name
        return self.kernel_spec_class.from_resource_dir(resource_dir)
      File "/home/tom/anaconda3/lib/python3.6/site-packages/jupyter_client/kernelspec.py", line 39, in from_resource_dir
        with io.open(kernel_file, 'r', encoding='utf-8') as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/home/tom/anaconda3/lib/python3.6/site-packages/nb_conda_kernels/logos/python/kernel.json'
[W 16:26:18.015 NotebookApp] Unhandled error
[E 16:26:18.015 NotebookApp] {
      "Host": "localhost:8888",
      "Connection": "keep-alive",
      "Accept": "*/*",
      "X-Requested-With": "XMLHttpRequest",
      "X-Xsrftoken": "2|c604aaf7|d2ca94a4861a397f298c5ca77bb7887a|1515006983",
      "Save-Data": "on",
      "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
      "Referer": "http://localhost:8888/tree",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9",
      "Cookie": "_xsrf=2|c604aaf7|d2ca94a4861a397f298c5ca77bb7887a|1515006983; username-localhost-8888=\"2|1:0|10:1516659977|23:username-localhost-8888|44:NGUyZGViNjk3ODIzNDM3MzgzZTdhYWVjNmJjZDhlMDg=|ac458ec291a81facd8bdf89545bfd55959a89f4254c4f32d68baed01a9e0cb93\""
    }
[E 16:26:18.015 NotebookApp] 500 GET /api/kernelspecs (127.0.0.1) 4.58ms referer=http://localhost:8888/tree

Tom Brander

unread,
Jan 22, 2018, 5:38:00 PM1/22/18
to Project Jupyter
Confirming that this error seems to prevent the sessions from starting with a kernel?
[E 16:31:52.282 NotebookApp] 500 GET /api/kernelspecs (127.0.0.1) 396.99ms referer=http://localhost:8888/notebooks/Documents/InfluenceH/Working_copies/CCS_propensity_wking/propensity_dnn.ipynb
The notebook opens but stays in a busy state and does not say the correct kernel name on the upper right,, the kernels are listed on the Conda kernel page though?

dunno why I can' bottom post here (a groups setting I think?)

Brian Granger

unread,
Jan 22, 2018, 7:19:34 PM1/22/18
to Project Jupyter
Looks like you are/were using nb_conda_kernels to manage kernels and
that one of the kernels isn't there as expected?
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/2bf4f148-d608-4bf3-be0f-7b2f797262a9%40googlegroups.com.

Tom Brander

unread,
Jan 22, 2018, 7:28:09 PM1/22/18
to jup...@googlegroups.com
solution? reinstall kernel? re register?

You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/4_FJmLWBbmI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Tom Brander
phn: 205-585-0310

Brian Granger

unread,
Jan 22, 2018, 7:36:13 PM1/22/18
to Project Jupyter

Tom Brander

unread,
Jan 22, 2018, 8:24:23 PM1/22/18
to Project Jupyter
I never explicitly used Conda kernels but I do remember having to do some hocus-pocus to register Jupyter kernels?

Tom Brander

unread,
Jan 23, 2018, 10:16:28 AM1/23/18
to Project Jupyter
So as of now having doe the update of terminado as suggested (as well as Jupyter, jupyter_core, ipython and tornado)
As well as conda update ipykernel
and:
tom@tomServal:~$ python -m ipykernel install --user
Installed kernelspec python3 in /home/tom/.local/share/jupyter/kernels/python3

I still am getting: [E 22:05:30.138 NotebookApp] Uncaught exception GET /api/kernelspecs (127.0.0.1)

and no kernels in the menu and hangs when opening a notebook (due to no kernels I guess..
So when I attempt to create a new notebook that option is grayed out..

oddly when I run:
tom@tomServal:~$ jupyter kernelspec list
Available kernels:
  clojure    /home/tom/anaconda3/share/jupyter/kernels/clojure
  groovy     /home/tom/anaconda3/share/jupyter/kernels/groovy
  java       /home/tom/anaconda3/share/jupyter/kernels/java
  kotlin     /home/tom/anaconda3/share/jupyter/kernels/kotlin
  python3    /home/tom/anaconda3/share/jupyter/kernels/python3
  scala      /home/tom/anaconda3/share/jupyter/kernels/scala
  sql        /home/tom/anaconda3/share/jupyter/kernels/sql

And my envs are as follows (these were all available in Jupyter before I updated to 5.3.1
tom@tomServal:~$ conda info --envs
# conda environments:
#
py27                     /home/tom/anaconda3/envs/py27
py36                     /home/tom/anaconda3/envs/py36
py362                    /home/tom/anaconda3/envs/py362
py36j                    /home/tom/anaconda3/envs/py36j
py36n                    /home/tom/anaconda3/envs/py36n
pyfolioenv               /home/tom/anaconda3/envs/pyfolioenv
tf13rccpu                /home/tom/anaconda3/envs/tf13rccpu
tf3rc                    /home/tom/anaconda3/envs/tf3rc
tf4                      /home/tom/anaconda3/envs/tf4
tf4n                     /home/tom/anaconda3/envs/tf4n
root                  *  /home/tom/anaconda3

As mentioned they are are still visible on the conda tab in the notebook

Given that many if not the majority of jupyter users now use conda this seems like an issue..!

I am happy to provide more diagnostic info or accept suggestions as to how to fix it? Seems like a missing or misplaced config file of some sort (something got moved or is now being pointed to in a new place?)
But At the moment I'm stuck...


Tom Brander

unread,
Jan 23, 2018, 10:22:57 AM1/23/18
to Project Jupyter
also just noticed that the notebook start up messages have:

[I 22:05:29.402 NotebookApp] [nb_conda_kernels] enabled, 11 kernels found

Thomas Kluyver

unread,
Jan 23, 2018, 1:00:51 PM1/23/18
to Project Jupyter
I'm not sure if it's the same issue, but there's also a suggestion that nb_conda_kernels is incompatible with the most recent conda:
https://github.com/Anaconda-Platform/nb_conda_kernels/issues/73

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Tom Brander

unread,
Jan 23, 2018, 2:30:06 PM1/23/18
to Project Jupyter
Thomas, Thanks for the note, problem identified and fix should be posted tomorrow they hope https://github.com/jupyter/jupyter_client/issues/338 Kind of a complex issue between Conda and Jupyter

MinRk was spectacular in finding it.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages