jupyter notebook 설치하기

By | 2020년 4월 4일
Table of Contents

jupyter notebook 설치하기

python3 -V
sudo apt install python3-pip
pip3 install jupyter

로그아웃을 했다가 재접속해야 jupyter 가 인식됩니다.

원격으로 접속하기

암호화된 비밀번호 생성하기

파이선을 실행하고 from notebook.auth import passwd; passwd() 를 입력하면, 암호화된 비밀번호를 생성할 수 있습니다.

python3
......
>>> from notebook.auth import passwd; passwd()
Enter password:
Verify password:
'sha1:d70e38d4cf39:595fcd506b17cec600bXXXXXXXXXXXXXa'

주피터 설정 변경

jupyter notebook --generate-config
vi /home/ubuntu/.jupyter/jupyter_notebook_config.py
......
c.NotebookApp.allow_origin = '*'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.password = 'sha1:d70e38d4cf39:595fcd506b17cec600bXXXXXXXXXXXXXa'
c.NotebookApp.open_browser = False
......

주피터 실행

jupyter notebook --config /home/ubuntu/.jupyter/jupyter_notebook_config.py

백그라운드로 주피터 실행

정상적으로 실행되는 것을 확인한 후 아래 명령으로 백그라운드로 실행하도록 할 수 있습니다.

nohup jupyter notebook --config /home/ubuntu/.jupyter/jupyter_notebook_config.py &

답글 남기기