Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
05-15 02:05
관리 메뉴

nomad-programmer

[Conda/Jupyter LAB] 가상환경 만든 후 커널 생성 및 삭제 본문

Conda/Jupyter LAB

[Conda/Jupyter LAB] 가상환경 만든 후 커널 생성 및 삭제

scii 2019. 11. 28. 00:49
// <필수> [선택]

conda create --name <가상환경이름> python=<파이썬버전> [anaconda]

입맛에 맞게 가상 환경을 만든다. 그 후 jupyterlab에서 그 가상환경을 쓸 수 있도록 추가해주면 된다.

// 커널을 생성하고자하는 가상환경으로 접속 후 작업한다.

// 커널 설치
conda install ipykernel

// 주피터 커널 생성
python -m ipykernel install --user --name <가상환경이름> [--display-name="<jupyterlab에서 보이고 싶은 커널 이름>"]

이렇게 하면 jupyterlab에서 본인이 생성한 가상환경을 커널로 쓸 수 있다.

auto_gui 가상환경을 커널로 추가한 모습

 

주피터 커널 삭제

// 콘다로 가상환경을 삭제하여도 커널은 남아있는다. 그래서 커널도 지워야 완전하게 지워진것이다.

// 주피터 커널스펙 리스트로 삭제할 커널 이름 확인
jupyter kernelspec list

// 삭제
jupyter kernelspec uninstall <커널 이름>


// 참고로 가상환경 삭제 명령은 이렇다.
conda remove --name <가상환경 이름> --all
Comments