일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Flask
- file
- enV
- git
- pandas
- Package
- AI
- list
- judge
- Converting
- Windows
- format
- Python
- GitLab
- LLM
- Laravel
- evaluation
- KAKAO
- DB
- Mac
- docker
- Database
- TORCH
- Linux
- CUDA
- Paper
- numpy
- Container
- PostgreSQL
- pytorch
Archives
- Today
- Total
Daily Develope
[Anaconda] Python conda 가상환경 본문
가상환경 설정/관리
생성
명령어로 명시적으로 생성
conda create -n {env_name} python={version}
# 예) conda create -n my_python_env python=3.9.12
패키지 파일로부터 생성 (default: requirements.txt)
conda create -n {env_name} --file requirements.txt
조회
conda info --envs
활성화 (사용할 가상환경 선택)
conda activate {env_name}
삭제
conda remove -n {env_name} --all
복제
cf. conda 환경명을 바꾸는 명령(rename)은 없으므로, 필요하다면 복제 후 기존 환경을 삭제
conda create -n {cloned_env} --clone {original_env}
가상환경내 패키지 관리
조회
설치된 패키지 목록 조회
conda list
설치
현재 가상환경에 설치
conda install -n {env_name} {package_name}
특정 가상환경에 설치
conda install -n {env_name} {package_name}
내보내기 (Export)
# method 1)
conda list --export > requirements.txt
# method 2)
pip freeze > requirements.txt
# method 3) 환경 내보내기
conda env export > environment.yml
불러오기 (Import)
# method 1)
conda install --file requirements.txt
# method 2)
pip install -r requirements.txt
참고
'Develope > Python' 카테고리의 다른 글
[Python] 단위테스트 (Unit test) (0) | 2022.10.25 |
---|---|
[Python] 엑셀(Excel) 파일 데이터 읽기/쓰기 (0) | 2022.09.22 |
[Python] 시간 측정 (예제코드) (0) | 2022.06.28 |
[Python] Draw Image 이미지 그리기 (0) | 2022.04.11 |
[Python] 정렬 Sort (Dict, Class) (0) | 2022.04.11 |
Comments