2

I am trying to use jupyter notebook with python3. Then I added the kernel with

python3 -m pip install ipykernel
python3 -m ipykernel install --user

But when I start a notebook it shows a Dead kernel message, and the terminal shows

Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

If I choose python2 kernel it works well. I can run python command in console without any issue.

jcgarciaca
  • 139
  • 12
  • Possible duplicate of [ImportError: No module named 'encodings'](https://stackoverflow.com/questions/38132755/importerror-no-module-named-encodings) – Avery Jan 17 '18 at 18:49
  • But if I type `python2` or `python3` in terminal it doesn't show any error, it is just for `jupyter notebook` with `python3`, and I am not using a virtual environment. – jcgarciaca Jan 17 '18 at 20:21
  • Try looking at some of the other solutions? If you're on windows, there's some for that, and also one for Ubuntu. One of those might work! – Avery Jan 17 '18 at 20:31

1 Answers1

1

Try

python3 -m pip install --upgrade pip
python3 -m pip install jupyter
jupyter notebook
It worked for me.