기타 참고

아나콘다 프롬프트(Anaconda Prompt) 가상 환경 구축

He__o 2022. 7. 26. 22:29

1. 가상 환경 목록 확인

conda env list

2. 가상 환경 생성

# django : 가상 환경 이름(자유롭게 지정)
conda create --name django

3. 가상 환경 구동

conda activate django

4. 가상 환경에서 base로 이동

conda deactivate

5. 가상 환경 삭제

conda env remove --n 가상환경이름

6. 가상 환경 내 라이브러리 설치

새로 생성한 가상 환경에서 최초 1회 진행

# 주피터노트북 설치
pip install jupyter notebook
## 가상 환경 커널 생성 및 연결
# conda install ipykernel
python -m ipykernel install --user --name 가상환경명 --display-name 커널명

커널 생성 예시 (django_kernel)

## 기본 설치 라이브러리
conda install ipython jupyter matplotlib pandas sklearn xlrd seaborn
conda install ipython jupyter matplotlib pandas scikit-learn xlrd seaborn openpyxl
# pip install ipython jupyter matplotlib pandas sklearn xlrd seaborn

conda install openpyxl
# pip install openpyxl

conda install -c conda-forge scikit-learn
# pip install scikit-learn