Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Jupyter (v. 4.4.0) notebook (v. 5.3.1) makes kernels inaccessible to notebook #3241

Open
ctivanovich opened this issue Jan 21, 2018 · 7 comments

Comments

@ctivanovich
Copy link

ctivanovich commented Jan 21, 2018

Since upgrading to the newest version of notebook (I think, or maybe it was an upgrade for jupyter), suddenly, Jupyter notebook command doesn't recognize any of my kernels. Here is the output of conda info:

conda version : 4.4.7
    conda-build version : 3.2.2
         python version : 3.5.4.final.0
       base environment : C:\Anaconda3  (writable)
           channel URLs : https://repo.continuum.io/pkgs/main/win-64
                          https://repo.continuum.io/pkgs/main/noarch
                          https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/win-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
          package cache : C:\Anaconda3\pkgs
                          C:\Users\...\AppData\Local\conda\conda\pkgs
       envs directories : C:\Anaconda3\envs
                          C:\Users\...\AppData\Local\conda\conda\envs
                          C:\Users\...\.conda\envs
               platform : win-64
             user-agent : conda/4.4.7 requests/2.18.4 CPython/3.5.4 Windows/10 Windows/10.0.16299
          administrator : False
             netrc file : None
           offline mode : False

The final callback in a very long error message is:

[W 13:35:29.358 NotebookApp] Error loading kernelspec 'python3'
    Traceback (most recent call last):
      File "C:\Anaconda3\lib\site-packages\jupyter_client\kernelspec.py", line 257, in get_all_specs
        spec = self._get_kernel_spec_by_name(kname, resource_dir)
      File "C:\Anaconda3\lib\site-packages\jupyter_client\kernelspec.py", line 201, in _get_kernel_spec_by_name
        return self.kernel_spec_class.from_resource_dir(resource_dir)
      File "C:\Anaconda3\lib\site-packages\jupyter_client\kernelspec.py", line 46, in from_resource_dir
        with io.open(kernel_file, 'r', encoding='utf-8') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Anaconda3\\lib\\site-packages\\nb_conda_kernels\\logos\\python\\kernel.json'

I have confirmed there is no kernel.json file in that location, but it strikes me as a bit strange that it would be expected to live next to several logo.png files.

Some more snooping around has found a kernel.json file at path:
C:\Anaconda3\share\jupyter\kernels\python3.

I guess the update is pointing the notebook to the wrong place? I copy/paste the kernel.json file (which only has config for python 3, though before the update I had a kernel in place for a py27 environment I created with conda) to the expected location 'C:\\Anaconda3\\lib\\site-packages\\nb_conda_kernels\\logos\\python\\kernel.json', and the notebook can now access python 3, but none of the 3 or 4 other kernels I had before are available. Not sure where to find them, or what I could write into the kernel.json file to make them available, and I'd worry about screwing up the the system in unforeseen ways. Any advice or suggestions? Thanks!

@abedkhooli
Copy link

Same observation on Win 10 when upgrading from nb 5.2 to 5.3 using conda. Python 3.5, also have R kernel installed. Copied kernel.json file from share to logos\python.

@takluyver
Copy link
Member

I don't know what would be causing that. From the path involved, it sounds like it might be something to do with the nb_conda_kernels extension, which we don't maintain.

@alt17
Copy link

alt17 commented Jan 22, 2018

Downgrade
notebook: 5.3.1-py27_0 --> 5.2.2-py27h3cd48a9_0
jupyter_core: 4.4.0-py27h1619e65_0 --> 4.3.0-py27h7bec3d2_0
helps.
But downgrade nb_conda_kernels: 2.1.0-py27_0 --> 2.0.0-py27_0 - not.

@ctivanovich
Copy link
Author

ctivanovich commented Jan 23, 2018

Yes, I did as Alt17 suggests, and the problem has vanished. All my env kernels are back as options (python 3.5 though).

@gnestor
Copy link
Contributor

gnestor commented Jan 23, 2018

Similar: #3245

@jzf2101
Copy link
Contributor

jzf2101 commented Feb 9, 2018

FWIW I have this same issue as well and @alt17's solution fixed it

@gnestor
Copy link
Contributor

gnestor commented Feb 13, 2018

It took a couple days for the conda-forge recipe to be merged after notebook 5.4.0 was published. It's published now, so if you used conda to install jupyter notebook initially, just upgrade using conda upgrade notebook. That will upgrade dependencies like jupyter-client and should fix this issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants