Post

[Anaconda] Anaconda 각종 명령어

Anaconda에서 사용하는 각종 명령어를 요약해보았다.

Anaconda 및 Miniconda 사용법

Conda 버전 확인

  • conda -V
  • conda --version

가상환경 생성

1
$ conda create -n test_env python=3.8

Python 3.5 버전의 ‘test_env’라는 이름으로 env를 생성

env list 보기

1
$ conda env list

or

1
$ conda info --envs

env 활성화

1
$ conda activate test_env

env 비활성화

1
$ conda deactivate

env 삭제

1
$ conda env remove -n test_env

env 복사

1
$ conda create -n test_env_clone --clone test_env

env 내보내기

가상환경 실행 후 -> yaml 파일 생성

1
$ conda env export > test_env.yaml

env 가져오기

yaml 파일이 있는 경로에서 실행

1
$ conda env create -f test_env.yaml

package install

1
$ conda install [~~]

채널을 이용하면

1
$ conda install -c conda-forge [~~]

conda-forge 채널 추가하기

1
$ conda config --add channels conda-forge

등록된 채널 확인하기

1
$ conda config --show channels

가장 낮은 우선순위의 채널 추가

1
$ conda config --append channels {채널명}

채널 삭제

1
$ conda config --remove channels {채널명}

Jupyter Notebook

Jupyter Notebook install

1
$ conda insatll jupyter

ipykernel (가상환경 별로 jupyter kernel에 연결시켜줘야함)

1
$ conda install ipykernel
1
$ python -m ipykernel install --user --name=가상환경이름

kernel 목록 보기

1
$ jupyter kernelspec list

제거하기

1
$ jupyter kernelspec uninstall 가상환경이름
This post is licensed under CC BY 4.0 by the author.

-

[VS Code] Custom 자동 완성, Snippets