Jupyter 安裝Python2和Python3一起使用

安裝 install並且開放可以連線的ip

sudo apt-get install jupyter-notebook

jupyter-notebook –generate-config

vi /home/pi/.jupyter/jupyter_notebook_config.py

 

最近開始使用JUPYTER,但之前都學PYTHON2,

所以要幫原來的PYTHON3的版本裝上PYTHON2的支援.

python2 -m pip install ipykernel

python2 -m ipykernel install –user

 

Github放在這裡:

https://github.com/jacch/jupyternbonrpi

 

Jupyter-設定密碼:
#以下先在JUPYTER中執行後產出密碼
from notebook.auth import passwd
passwd()

c.NotebookApp.notebook_dir = ‘/home/pi/project’

c.NotebookApp.open_browser = False

c.NotebookApp.ip = ‘*’
c.NotebookApp.password = ‘sha1:2fcf50cbab99:9f4273b304cca073073808e5f7678964d4bc4c49’