I\'d like to work with Jupyter notebooks, but have had difficulty doing basic imports (such as import matplotlib). I think this was because I have several user-managed pytho
@jakevdp explained it very well.
When I updated my ubuntu I also had the same problem and I solved it by changing the kernel configuration file(kernel.json). To list the kernel files location. Use
jupyter kernelspec list
It will return
Available kernels:
python3 /home/user1/.local/share/jupyter/kernels/python3
python2 /usr/local/share/jupyter/kernels/python2
I was using python3 so I changed the file at
/home/user1/.local/share/jupyter/kernels/python3
by following step
nano /home/user1/.local/share/jupyter/kernels/python3/kernel.json
There inside
argv
I changed the first parameter(i.e. python3 directory path) form
"/usr/bin/python3.5"
to
"/usr/bin/python3"
and saved it with
ctr+x
and restarted jupyter-notebook.