2018年9月7日 星期五

Jupyter notebook can't use both python2 and python3

Recently, I install Jupiter notebook in my new 2018MBP laptop. 

I found I can switch python 2 and python3 on Jupyter  notebook. But I found it often claim 

There is no python modules no matter which python kernel I used.

Therefore  I print sys.version in Jupyter notebook

Import sys

sys.version

===> it always use python 3.7

After  have some try and error, I found the root cause it just because I didn’t install ipykernel with —user

After executed it, everything works fine

#python -m ipykernel install --user

 

沒有留言:

How to restore a deleted onenote page

復原不小心誤刪的onenote