Ubuntu에서 Miniconda3 설치하기

Seungsoo Lee·2023년 7월 7일
0

python

목록 보기
4/4

이 포스트에서는 Ubuntu에 Miniconda3를 설치하는 방법에 대해 알아보겠습니다. Miniconda는 Anaconda의 축소된 버전으로, Python과 필수 패키지 관리 도구인 Conda만 포함하고 있습니다. 이로 인해 설치가 빠르고 적은 디스크 공간을 차지합니다. 아래는 Miniconda3를 Ubuntu에 설치하는 단계입니다.

  1. 첫 번째로 시스템을 최신 상태로 업데이트하겠습니다.

    sudo apt update
    sudo apt upgrade
  2. curl이 설치되어 있지 않다면, curl을 설치합니다.

    sudo apt install curl
  3. Miniconda3 설치 스크립트를 다운로드합니다.

    curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o Miniconda3-latest-Linux-x86_64.sh
  4. 다운로드 받은 스크립트에 실행 권한을 부여합니다.

    chmod +x Miniconda3-latest-Linux-x86_64.sh
  5. 스크립트를 실행하여 Miniconda3를 설치합니다.

    bash Miniconda3-latest-Linux-x86_64.sh
  6. 라이센스 약관을 수락합니다.

    Do you accept the license terms? [yes|no] yes
  7. 설치 위치를 확인합니다. 기본 위치는 /root/miniconda3 입니다.

    Miniconda3 will now be installed into this location:
    /root/miniconda3
    
    - Press ENTER to confirm the location
    - Press CTRL-C to abort the installation
    - Or specify a different location below
    
    [/root/miniconda3] >>> ENTER
  8. 설치 후에 Conda를 초기화합니다.

    Do you wish the installer to initialize Miniconda3
    by running conda init? [yes|no]
    [no] >>> yes

이제 Miniconda3의 설치는 완료되었습니다. 다음은 환경변수 설정을 해야합니다.

  1. PATH 환경변수에 Miniconda3의 bin 디렉토리를 추가합니다.
    export PATH=$PATH:/root/miniconda3/bin
  2. PATH가 제대로 설정되었는지 확인합니다.
    echo $PATH
  3. Miniconda3가 제대로 설치되었는지 확인합니다.
    conda --version

마지막으로, 터미널을 재시작한 후에 conda 명령이 제대로 동작하는지 확인하면 Miniconda3의 설치가 완료된 것입니다. 이제 Miniconda3를 활용하여 다양한 Python 패키지 관리를 쉽게 할 수 있습니다.

0개의 댓글