Creative-Chan

Jupyter Notebook (JupyterLab) ์›๊ฒฉ์„œ๋ฒ„ ์„ค์ •ํ•˜๊ธฐ ๋ณธ๋ฌธ

Programming/Linux

Jupyter Notebook (JupyterLab) ์›๊ฒฉ์„œ๋ฒ„ ์„ค์ •ํ•˜๊ธฐ

Creative.Chan 2022. 3. 24. 18:03

๋ชฉ์ฐจ

     

    ๐Ÿ’ก Anaconda ํ™˜๊ฒฝ์—์„œ Jupyter Lab ์„ค์น˜ ๋ฐ Ubuntu 18.04 ์›๊ฒฉ ์„œ๋ฒ„ ๊ตฌ์„ฑ

    1. Jupyter๋ž€?

    “Project Jupyter”๋Š” IPython (Interactive Python) ํ”„๋กœ์ ํŠธ์—์„œ ํƒ„์ƒํ•œ ๋น„์˜๋ฆฌ ์˜คํ”ˆ์†Œ์Šค ํ”„๋กœ์ ํŠธ์ž…๋‹ˆ๋‹ค.

    Data Science, Machine Learning ๋“ฑ์—์„œ Python์„ ์‰ฝ๊ฒŒ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด์ง„ Web ๊ธฐ๋ฐ˜์˜ Interactive Interpreter๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    Python ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋‹ค์–‘ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด๋กœ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ์‹คํ–‰ํ•˜๋Š” ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

    ๊ธฐ๋ณธ์ ์œผ๋กœ ๋ธ”๋ก ๋‹จ์œ„๋กœ ์ฝ”๋“œ ์‹คํ–‰์ด ๊ฐ€๋Šฅํ•˜๊ณ , ์ด๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์‹œ๊ฐํ™”ํ•˜๊ณ  ๋””๋ฒ„๊น… ํ•˜๋Š” ๋“ฑ, ๋‹ค์–‘ํ•œ ์ž‘์—…์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ, ๋งˆํฌ๋‹ค์šด ๋ฌธ๋ฒ•์„ ํ™œ์šฉํ•˜์—ฌ ์ฃผ์„์„ ๋‹ค๋Š” ๋“ฑ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ฝ”๋“œ์™€ ์‹คํ–‰๊ฒฐ๊ณผ์™€ ๋”๋ถˆ์–ด ํ•˜๋‚˜์˜ ๋ฌธ์„œ์ฒ˜๋Ÿผ ๊ด€๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ํŠน์ง•์ด ์žˆ์Šต๋‹ˆ๋‹ค.

    Jupyter Notebook์€ ๊ณ ์ „์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ฐ€์ง„ web application์œผ๋กœ ๋‹จ์ˆœํ•˜๊ณ  ๋ฌธ์„œ ์ค‘์‹ฌ์ ์ธ ๊ฒฝํ—˜์„ ์ œ๊ณตํ•˜๋Š” ๋ฐ˜๋ฉด, JupyterLab์€ Jupyter Notebook์„ ๊ฐœ์„ ํ•œ ์ฐจ์„ธ๋Œ€ ์ธํ„ฐํŽ˜์ด์Šค๋กœ ์›น ๊ธฐ๋ฐ˜์˜ ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด Jupyter Notebook์— ๋‹ค์ค‘ ํƒญ ์ง€์› ๋ฐ ๋‹ค์–‘ํ•œ ํ™•์žฅ ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•œ ํ–ฅ์ƒ๋œ ์‹œ์Šคํ…œ์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ๋ณธ ๋ฌธ์„œ์—์„œ๋Š” JupyterLab์„ Ubuntu 18.04์— ์„ค์น˜ํ•˜๊ณ , ๋ถ€ํŒ…์‹œ ์ž๋™ ์‹คํ–‰๋˜๋Š” ์›๊ฒฉ ์„œ๋ฒ„๋กœ ๊ตฌ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ •๋ฆฌํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    2. JupyterLab ์„ค์น˜ ๋ฐ ์„ค์ •

    2.1 JupyterLab ์„ค์น˜

    Anaconda ํ™˜๊ฒฝ์—์„œ JupyterLab์˜ ์„ค์น˜๋Š” ๊ฐ„๋‹จํ•œ ๋ช…๋ น์–ด๋กœ ์ง„ํ–‰๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    pip install jupyterlab

    ์„ค์น˜๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์™„๋ฃŒ๋˜๋ฉด ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    jupyter lab
    # ๋˜๋Š”
    jupyter-lab

    2.2 JupyterLab ์„ค์ •

    JupyterLab์€ ์›น ๊ธฐ๋ฐ˜ Application์ด๊ธฐ ๋•Œ๋ฌธ์— ์‹คํ–‰ํ•˜๊ฒŒ ๋˜๋ฉด ๊ธฐ๋ณธ์ ์œผ๋กœ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์—ด๋ฆฌ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

    ์„œ๋ฒ„๋งŒ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” —-no-browser๋ฅผ ์‹คํ–‰ ๋ช…๋ น์–ด ๋’ค์— ๋ถ™์ด๊ฒŒ ๋˜๋ฉด ๋ธŒ๋ผ์šฐ์ €๋Š” ์ž๋™์œผ๋กœ ์—ด๋ฆฌ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

    jupyter-lab --no browser

    ์ถ”๊ฐ€์ ์ธ ์„ธํŒ… ์—†์ด ์‹คํ–‰ํ•  ๊ฒฝ์šฐ ์›น ๋ธŒ๋ผ์šฐ์ €์—์„œ๋Š” http://localhost:8888 ๋˜๋Š” http://12.0.0.1:8888 ์ฃผ์†Œ๋กœ ์ ‘์†ํ•˜๋ฉด JupyterLab์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ์ ‘์†์˜ ip ํ˜น์€ port ๋ฒˆํ˜ธ๋ฅผ ์ง€์ •ํ•˜์—ฌ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด, --ip ์™€ --port ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    jupyter-lab --ip=<ip address> --port=<port number>

    ๋งค๋ฒˆ ์ด๋Ÿฌํ•œ ์„ค์ •์„ ํ•˜๊ธฐ๋Š” ๋ฒˆ๊ฑฐ๋กญ๊ธฐ ๋•Œ๋ฌธ์— ๊ธฐ๋ณธ ์‹คํ–‰ ์˜ต์…˜์„ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” config ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. config ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

    jupyter-lab --generate-config

    ์œ„ ๋ช…๋ น์–ด๋Š” ~/.jupyter/ ์œ„์น˜์— jupyter_notebook_config.py ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

    (๋‹ค๋ฅธ ์œ„์น˜์— ์žˆ๋Š” config ํŒŒ์ผ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, ๋ณธ ๊ธ€์—์„œ๋Š” ๋‹ค๋ฃจ์ง€ ์•Š๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.)

    ์ œ๊ฐ€ ์‚ฌ์šฉํ•œ ์˜ต์…˜ ์œ„์ฃผ๋กœ ์„ค๋ช…ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ ์ฝ”๋“œ๋ธ”๋Ÿญ์— ์žˆ๋Š” ๋‚ด์šฉ์„ ์ƒ์„ฑ๋œ jupyter_notebook_config.py ํŒŒ์ผ์˜ ์ œ์ผ ์œ„์— ๋ถ™์—ฌ ๋„ฃ์–ด ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

    c = get_config()
    c.JupyterApp.config_file_name = 'jupyter_notebook_config.py'
    c.NotebookApp.allow_origin = '*'
    c.NotebookApp.ip = 'ip_address'
    c.NotebookApp.open_browser = False
    c.NotebookApp.password = 'password'

    c.NotebookApp.allow_origin = ‘*’ ์˜ต์…˜์€ JupyterLab ์„œ๋ฒ„์— ์ ‘์†์„ ํ—ˆ์šฉํ•˜๋Š” IP๋ฅผ ํŠน์ •ํ•˜๋Š” ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์€ ๋‚ด๋ถ€์ ‘์†๋งŒ ํ—ˆ์šฉ๋˜๋Š” ‘’ ์ด์ง€๋งŒ ์™ธ๋ถ€ ์ ‘์†์„ ์œ„ํ•ด์„œ ๋ชจ๋“  ๊ณณ์—์„œ ์ ‘์†์ด ๊ฐ€๋Šฅํ•œ ‘*’ ๋กœ ์„ค์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ด๋Ÿด ๊ฒฝ์šฐ ๋ณด์•ˆ์— ๋ฌธ์ œ๊ฐ€ ๋  ์ˆ˜ ์žˆ์œผ๋‹ˆ ์•”ํ˜ธ๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด ํ•„์ˆ˜์ ์ด๋ผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    c.NotebookApp.ip = 'ip_address' ์˜ต์…˜์€ JupyterLab ์„œ๋ฒ„ ์ ‘์†์— ์‚ฌ์šฉํ•  IP ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค. ๋ณธ์ธ ์ปดํ“จํ„ฐ์˜ IP ์ฃผ์†Œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

    c.NotebookApp.open_browser = False ์˜ต์…˜์€ Jupyter ์‹คํ–‰ ์‹œ์— ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์ž๋™์œผ๋กœ ์‹คํ–‰ํ• ์ง€ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์€ True์ด๋‚˜ ๋ธŒ๋ผ์šฐ์ € ์‹คํ–‰์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด False๋ฅผ ์‚ฌ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    c.NotebookApp.password = 'password' ์˜ต์…˜์€ Jupyter ์„œ๋ฒ„์— ์ ‘์†ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•  ์•”ํ˜ธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ํŒจ์Šค์›Œ๋“œ๋Š” ํŒŒ์ด์ฌ ์‰˜์—์„œ ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    >>> from notebook.auth import passwd
    >>> passwd()
    Enter password:  # ์•”ํ˜ธ ์ž…๋ ฅ
    Verify password:  # ์•”ํ˜ธ ํ™•์ธ
    'password' # ๋ณตํ˜ธํ™”๋œ ์•”ํ˜ธ ํ•ด์‹œ ๊ฐ’ ์ถœ๋ ฅ

    ์ƒ์„ฑ๋œ ‘password’ ๊ฐ’์„ ๋ณต์‚ฌํ•˜์—ฌ ์œ„์˜ ์˜ต์…˜์— ๋„ฃ์–ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์ ‘์† ์‹œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์•”ํ˜ธ ์ž…๋ ฅ ์ฐฝ์„ ๋ณผ ์ˆ˜ ์žˆ๊ฒŒ ๋˜๊ณ  ์ž…๋ ฅํ•œ ์•”ํ˜ธ๋ฅผ ๋„ฃ์œผ๋ฉด ์ ‘์† ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

    ์ด๋Ÿฌํ•œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด JupyterLab์„ ์‹คํ–‰ํ•˜๊ณ  ์žˆ๋Š” ํ•˜๋‚˜์˜ Terminal ์ฐฝ์ด ๊ณ„์†ํ•ด์„œ ์กด์žฌํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” nohup ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    # nohup์€ ๋ฆฌ๋ˆ…์Šค์—์„œ ํ”„๋กœ์„ธ์Šค๋ฅผ ์‹คํ–‰ํ•œ ํ„ฐ๋ฏธ๋„์˜ ์„ธ์…˜ ์—ฐ๊ฒฐ์ด ๋Š์–ด์ง€๋”๋ผ๋„ ๋™์ž‘ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

    nohup jupyter-lab &

    2.3 JupyterLab ์„œ๋น„์Šค ๋“ฑ๋ก (๋ถ€ํŒ… ์‹œ ์ž๋™ ์‹คํ–‰)

    ์œ„์˜ ๋ช…๋ น์–ด๋“ค์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ JupyterLab์„ ์‚ฌ์šฉํ•  ๋•Œ๋งˆ๋‹ค ์„œ๋ฒ„๋ฅผ ์—ด์–ด์•ผํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ์Šต๋‹ˆ๋‹ค.

    ์›๊ฒฉ์ง€์—์„œ ์„œ๋ฒ„๊ฐ€ ์žฌ๋ถ€ํŒ…๋˜๊ฑฐ๋‚˜ ํ•˜๋Š” ๊ฒฝ์šฐ์—๋„ ์ž๋™์œผ๋กœ ์‹คํ–‰๋˜๋„๋ก ์„œ๋น„์Šค๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์„ ๊ณต์œ ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

    • ์ดˆ๊ธฐ์—๋Š” conda ํ™˜๊ฒฝ ์•ˆ์— Jupyter๋ฅผ ์„ค์น˜ํ•˜์—ฌ ์‚ฌ์šฉํ–ˆ์œผ๋‚˜ ์ผ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์™€์˜ ์ถฉ๋Œ์ด ์žˆ์–ด ๊ธฐ๋ณธ ํ™˜๊ฒฝ์— Jupyter๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์ปค๋„์„ ์ถ”๊ฐ€ํ•˜์˜€์œผ๋ฉฐ, ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๋“ฑ์˜ ๋ฌธ์ œ๊ฐ€ ์žˆ์–ด ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ ์‚ฌ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๋ฆฌ๋ˆ…์Šค service ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

    sudo nano /etc/systemd/system/jupyter.service

    ๋‹ค์Œ ๋‚ด์šฉ์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

    [Unit]
    Description=Jupyter Server
    
    [Service]
    User=<USERNAME>
    ExecStart=/bin/bash -i -c "jupyter-lab --allow-root --config=<CONFIG_PATH>"
    WorkingDirectory=<DIRECTORY>
    Restart=on-failure
    RestartSec=10s
    
    [Install]
    WantedBy=multi-user.target

    ์‚ฌ์šฉ์ž์— ๋งž๊ฒŒ ๋ณ€๊ฒฝํ•ด์•ผํ•˜๋Š” ์˜ต์…˜์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

    • : ์‚ฌ์šฉ์ž ์ด๋ฆ„
    • <CONFIG_PATH>: ์•ž์—์„œ ์ƒ์„ฑํ•œ jupyter_notebook_config.py ํŒŒ์ผ์˜ ์œ„์น˜
    • : ํ•ด๋‹น Jupyter๊ฐ€ ์ ‘๊ทผ ํ•  ์ˆ˜ ์žˆ๋Š” ์ž‘์—… ๊ฒฝ๋กœ

    ์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ํ•ด์„ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

    • ์„ค์ •ํ•œ User์˜ ๊ถŒํ•œ์œผ๋กœ WorkingDirectory์—์„œ ExecStart์˜ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•œ๋‹ค.
    • Restart ์กฐ๊ฑด์ผ ๋•Œ, RestartSec ๋งˆ๋‹ค ์„œ๋น„์Šค๋ฅผ ์žฌ์‹คํ–‰ํ•œ๋‹ค.

    ๋ณธ์ธ์˜ ๊ฒฝ์šฐ ์ผ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ์ถฉ๋Œ์ด ์žˆ์–ด ~/.bashrc ์— ์ž…๋ ฅ๋œ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ๋™์ผํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ, /bin/bash -i -c "jupyter-lab --allow-root --config=<CONFIG_PATH>" ๋ช…๋ น์–ด๋ฅผ ํ™œ์šฉํ•˜์—ฌ bash ๊ธฐ๋ฐ˜์œผ๋กœ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    ํ•ด๋‹น ํŒŒ์ผ์„ ์ž‘์„ฑํ•˜๊ณ  ์ €์žฅํ•œ ๋’ค, ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด์„œ ์ž‘์„ฑํ•œ ์„œ๋น„์Šค๋ฅผ ์‹œ์Šคํ…œ์— ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค.

    sudo systemctl daemon-reload
    sudo systemctl enable jupyter.service
    sudo systemctl start jupyter.service

    ๋“ฑ๋กํ•œ ์„œ๋น„์Šค์˜ ์ž‘๋™ ์ƒํƒœ๋ฅผ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

    sudo systemctl status jupyter.service

    ์œ„ ๋ช…๋ น์–ด ์‹คํ–‰์‹œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด active ํ‘œ์‹œ๊ฐ€ ๋œจ๋ฉด ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰์ค‘์ธ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

    2.4 JupyterLab Kernel ์ถ”๊ฐ€

    ์œ„์™€ ๊ฐ™์ด ์‹คํ–‰ํ•œ JupyterLab์—๋Š” ๊ธฐ๋ณธ ์ปค๋„๋งŒ ์ƒ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

    ์ƒ์„ฑ๋œ Conda ํ™˜๊ฒฝ์—์„œ ์ž‘์—…ํ•˜๊ณ ์ž ํ•œ๋‹ค๋ฉด ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด Kernel์„ ์ถ”๊ฐ€ํ•˜์—ฌ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

    1. ipykernel ์„ค์น˜

    pip install ipykernel

    2. JupyterLab ์•ˆ์— Kernel ์„ค์น˜

    python -m ipykernel install --user --name<๊ฐ€์ƒํ™˜๊ฒฝ ์ด๋ฆ„> --display-name<ํ‘œ์‹œ๋  ์ปค๋„ ์ด๋ฆ„>

    3. Kernel ํ™•์ธ

    jupyter kernelspec list

    4. Kernel ์ œ๊ฑฐ

    jupyter kernelspec uninstall <๊ฐ€์ƒํ™˜๊ฒฝ ์ด๋ฆ„>
    Comments