[Conda] Install Conda on WSL2 (miniconda)

2022. 7. 17. 08:47·Computer
728x90
728x90

1. wsl 설치

wsl --install

2023.06.12 - [Programming] - [WSL] Install WSL (Windows Subsystem for Linux)

 

[WSL] Install WSL (Windows Subsystem for Linux)

[WSL] Install WSLPre-requirements.windows 10 이상 : ( version 2004 , build 19041 이상이어야 함.)windows 11 권장 : ( gpu 기능 등 가능... )Tensorflow나 Pytorch등에서 GPU가속을 제대로 쓰려면, build 20150 이상은 되어야 함

dsaint31.tistory.com


2. Ubuntu Distribution 설치

Microsoft store에서 설치.


3. wsl 업데이트

command prompt 또는 windows terminal에서 다음의 명령어를 수행한다.

wsl --update
  • 생략 가능하나 가급적 수행하길 권한다. (wsl2가 훨씬 빠른 성능을 보임.)

4. Ubuntu shell실행.

window키+r 을 통해 열린 실행창이나, command prompt 나 windows terminal에서 다음의 명령어를 수행한다.

bash
  • wsl -d <distribution_name>와 같이 distribution을 지정하여 실행하는 것을 권장한다.

5. Ubuntu 패키지 업그레이드 및 Miniconda 설치

sudo apt update 
sudo apt-get upgrade 
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh 
bash ./Miniconda3-latest-Linux-x86_64.sh
  • 2022.12 : bash로 수행하지 않으면 다음과 같은 에러 발생.
  • CondaFileIOError on Installing * environmen ...

5-1. Miniconda 설치 시 선택.

다음의 메시지가 보임.

Welcome to Miniconda3 py310_22.11.1-1

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
  • Enter를 누르면 됨.
  • 이후 나오는 라이선스 관련 내용은 space를 눌러서 넘김.

라이센스 동의 물어봄.

Last updated March 21, 2022


Do you accept the license terms? [yes|no]
[no] >>>
  • yes를 입력하고 엔터

설치 위치를 물어봄

Miniconda3 will now be installed into this location:
/home/dsaint31/miniconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/dsaint31/miniconda3] >>>
  • 기본 설정 그대로 유지하는걸 권함.
  • 엔터 누르면 유지.
  • 이후 설치 진행됨.

설치 진행 종료 후 conda를 기본적으로 초기화해서 수행할지를 물어봄. (yes가 편함)

Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>>

이 후 셀에 재 접속 시 다음과 같이 conda 환경 (base)가 뜨게 되고 conda로 python 등을 사용할 수 있음.

mmmil@DESKTOP-2LFL50R:~$ exit
로그아웃

C:\Users\MMMIL>wsl ~ -d Ubuntu-22.04
(base) mmmil@DESKTOP-2LFL50R:~$

6. conda 업데이트

base에서 conda update -n base conda를 수행해서 최신 버전으로 업데이트.

 


References

https://docs.conda.io/en/latest/miniconda.html

 

Miniconda — conda documentation

Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others. Use the conda in

docs.conda.io

같이 보면 좋은 자료들

https://ds31x.tistory.com/343

 

[Conda] miniconda 설치하기: Windows, macOS, WSL

miniconda 설치하기: Windows, macOS, WSLMiniconda는 conda 패키지 관리자의 경량화된 버전.Python 환경을 관리하고 가볍게 시작할 수 있는 가장 좋은 선택 중 하나임. 이 문서에서는Windows에서는 공식문서의 qu

ds31x.tistory.com

https://ds31x.tistory.com/376

 

[Tool] conda 사용법 - Anaconda and Miniconda

1. Conda란?프로그래밍 언어(특히 Python)의 패키지, 종속성을 관리하기 위한 오픈 소스 패키지 관리 시스템(or Package Manager)과이들이 설치되어 구성되는 (가상)환경을 관리하는 환경관리시스템(package

ds31x.tistory.com

 

728x90

'Computer' 카테고리의 다른 글

[CE] Magnetic Tape (자기테이프)  (0) 2022.12.10
WSL 2에서 VHD(가상 하드 디스크)의 크기 확장  (0) 2022.08.06
[Etc] HTML5 Video 재생속도 조절 : Chrome Extension  (0) 2022.06.14
[ML] Logit에서 Logistic Function.  (0) 2022.06.06
[Windows] 화면 캡쳐 (스크린 샷) : Windows 10  (0) 2021.10.26
'Computer' 카테고리의 다른 글
  • [CE] Magnetic Tape (자기테이프)
  • WSL 2에서 VHD(가상 하드 디스크)의 크기 확장
  • [Etc] HTML5 Video 재생속도 조절 : Chrome Extension
  • [ML] Logit에서 Logistic Function.
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (787)
      • Private Life (15)
      • Programming (206)
        • DIP (116)
        • ML (35)
      • Computer (120)
        • CE (54)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (368)
        • Signals and Systems (115)
        • Math (176)
        • Linear Algebra (33)
        • Physics (43)
        • 인성세미나 (1)
      • 정리필요. (61)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (7)
        • PET Study 2009 (1)
        • 방사선 장해방호 (5)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    signals_and_systems
    Python
    Optimization
    function
    SS
    Probability
    math
    인허가제도
    SIGNAL
    signal_and_system
    cv2
    ML
    Term
    fourier transform
    Vector
    opencv
    Programming
    linear algebra
    random
    numpy
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[Conda] Install Conda on WSL2 (miniconda)
상단으로

티스토리툴바