その先にあるもの…

ubuntu에서 jupyter 실행 본문

프로그래밍/Python

ubuntu에서 jupyter 실행

specialJ 2021. 5. 20. 16:16

https://koos808.tistory.com/39

https://khann.tistory.com/22

 

서버에 주피터 노트북 설치

 

# 1. jupyter notebook 설치

conda install jupyter notebook

 

# 2. 기본 설정파일 생성

jupyter-notebook --generate-config

 

# 3. 커멘트창에서 ipython 실행

ipython

 

# 4. 아래 코드입력

from notebook.auth import security

security.passwd()

 

# 구버전의 경우 import security가 아닌 import password인 경우도 있다.

# 암호를 입력 후 출력되는 문자열을 복사해둔다

 

exit()

 

cd ~/.jupyter

vi jupyter_notebook_config.py

 

맨 위에

c = get_config()

c.JupyterApp.config_file_name = 'juyter_notebook_config.py'

c.NotebookApp.allow_origin = '*' # (접속 허용 ip – 본인 ip 아니면 * (전체 허용))

c.NotebookApp.ip = '0.0.0.0((서버 ip)'

c.NotebookApp.open_browser = False # False이면 jupyter notebook 실행시 창이 아닌 url이 나온다. c.NotebookApp.password = u'위에서 복사한 sha1 ~~~~~ 복사하기'

 

jupyter notebook으로 실행

 

chrome url주소창에서 위 ip주소:8888입력

 

 

 

'프로그래밍 > Python' 카테고리의 다른 글

read_html  (0) 2023.01.09
jupyter에서 kernel목록에 conda env list  (0) 2021.05.20
pandas sql 쿼리 결과 가져오기  (0) 2021.04.01
studio code에서 conda 사용  (0) 2021.04.01
conda 사용 설명  (0) 2021.04.01
Comments