Error when I try install a C kernel for jupyter

2.6k Views Asked by At

I'm trying to install the C kernel for jupyter, following the steps on the documentation. Which is

> pip install jupyter-c-kernel
> install_c_kernel
> jupyter-notebook

on the second step the following error appears:

Traceback (most recent call last):
  File "/usr/local/bin/install_c_kernel", line 8, in <module>
    from jupyter_client.kernelspec import KernelSpecManager
ModuleNotFoundError: No module named 'jupyter_client.kernelspec'

Apparently it isn't recognizing the module and I don't know how to fix it. Someone can help me?

2

There are 2 best solutions below

0
On BEST ANSWER

install_c_kernel --user is the command that worked for me and is recommended on Github issues for the repo here: https://github.com/brendan-rius/jupyter-c-kernel/issues/38

It also shows up as bash if you read the issue carefully but when you open the notebook it shows up as C.

If you already have a .ipynb notebook open you can choose Kernel from the menu and at the bottom it gives you the option to change kernels.

0
On

For me, the problem was that I haven't yet install jupyter packages for Python 3, as install_c_kernel runs on Python 3.

I checked it by listing the packages installed on two versions (pip2 list and pip3 list). It turned out that jupyter packages were installed for python 2, not python 3. I solved the problem by pip3 install jupyter.