๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ป DEV/์—ฐ๊ตฌ๋ชฉ๋ก

[ ์—ฐ๊ตฌ๋ชฉ๋ก ] Jupyter notebook ํŒŒ์ผ ์ €์žฅ ๊ฒฝ๋กœ (root) ๋ณ€๊ฒฝ

by Rising Oneโ˜… 2022. 10. 26.
728x90
๋ฐ˜์‘ํ˜•
SMALL

 

ํ•„์š”์„ฑ

 

jupyter notebook์„ ์‚ฌ์šฉํ•˜๋ฉด, ์ž‘์—…ํ•˜๋Š” ํŒŒ์ผ๋“ค์ด ์ €์žฅ๋˜๋Š” root ๊ฒฝ๋กœ(๊ณต๊ฐ„)์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
(์•„๋ฌด๋Ÿฐ ์„ค์ •์„ ํ•˜์ง€ ์•Š์œผ๋ฉด) ๊ธฐ๋ณธ ๊ฒฝ๋กœ๋Š” jupyter notebook์„ ์„ค์น˜ํ•  ๋•Œ์— ์ง€์ •ํ•œ ๊ฒฝ๋กœ๋กœ ์„ค์ •์ด ๋˜๋Š”๋ฐ, 
์ด ๋•Œ, ํฌ๋งํ•˜๋Š” root ๊ฒฝ๋กœ๋กœ ์ง€์ •์„ ํ•ด์ฃผ๊ณ  ์ž‘์—…์„ ์ด์–ด๋‚˜๊ฐˆ ํ•„์š”์„ฑ์„ ๋งˆ์ฃผํ•ฉ๋‹ˆ๋‹ค.


๋ฐฉ๋ฒ•

 

  1. anaconda prompt (powershell) ์‹คํ–‰

  2. ๋ช…๋ น์–ด ์ž…๋ ฅ
- root ๊ฒฝ๋กœ ์„ค์ •์„ ์œ„ํ•œ config ํŒŒ์ผ ์ƒ์„ฑ (์—†์„ ์‹œ)

```
>> jupyter notebook --generate-config # ๋ช…๋ น์–ด ์ž…๋ ฅ
Writing default config to: C:\Users\admin\.jupyter\jupyter_notebook_config.py # ์ƒ์„ฑ๋จ
```


  3. jupyter_notebook_config.py ํŒŒ์ผ open

 

- ํด๋” ๋‚ด ๊ฒฝ๋กœ์— ์ฐพ์•„๊ฐ€ config ํŒŒ์ผ์„ ์‹คํ–‰์‹œํ‚ต๋‹ˆ๋‹ค. (code editor)

  4. config ํŒŒ์ผ ๋‚ด ๋‚ด์šฉ ์ˆ˜์ • (ํฌ๋ง ๊ฒฝ๋กœ ์ž…๋ ฅ)

- ์ฝ”๋“œ ๋‚ด์šฉ๊ฒ€์ƒ‰์„ ํ†ตํ•ด ๊ฒ€์ƒ‰ํ•ด ํŽธํžˆ ์ ‘๊ทผ์„ ํ•ฉ๋‹ˆ๋‹ค.

```
๊ธฐ๋ณธ ๋‚ด์šฉ

## The directory to use for notebooks and kernels.
#  Default: ''
#  c.NotebookApp.notebook_dir = ''
```

 

- ์•„๋ž˜์™€ ๊ฐ™์ด ์ฃผ์„(#)์„ ํ’€๊ณ , ํฌ๋งํ•˜๋Š” ๊ฒฝ๋กœ๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค.

```
๋ณ€๊ฒฝํ•œ ๋‚ด์šฉ

## The directory to use for notebooks and kernels.
#  Default: ''
c.NotebookApp.notebook_dir = 'D:\\test' # ํฌ๋งํ•˜๋Š” ๊ฒฝ๋กœ
```


  5. jupyter notebook ์ข…๋ฃŒ ํ›„ ์žฌ์‹คํ–‰

- 1) jupyter notebook ์•ฑ ์ง์ ‘ ์‹คํ–‰
- 2) anaconda prompt ์—์„œ "jupyter notebook" ๋ช…๋ น์–ด ์ž…๋ ฅ

 

 

728x90
๋ฐ˜์‘ํ˜•
LIST

๋Œ“๊ธ€