I was facing the exact issue. It turns out that it was using the system Python version despite me having activated my virtual environment.
This is what eventually worked.
If you are using a virtual environment which has a name say myvenv
, first activate it using command:
source activate myvenv
Then install module ipykernel
using the command:
pip install ipykernel
Finally run (change myvenv in code below to the name of your environment):
ipykernel install --user --name myvenv --display-name "Python (myvenv)"
Now restart the notebook and it should pick up the Python version on your virtual environment.
ipython kernel
is pointing to a python version without amatplotlib
installation. – Timofei!pip install matplotlib
– Larrainelarrie