miniconda 및 jupyter 설치
1. conda vs miniconda
설치할때 약간 고민되는데
나의 경우는 내가 어떤 s/w를 설치해야하는지 알아야 하기도하고
버전에 따라서 안되는 경우도 존재해서 mini conda 가 좋은 것 같음.
그리고 용량도 작음.
https://docs.conda.io/projects/miniconda/en/latest/index.html
Miniconda — miniconda documentation
These three commands quickly and quietly install the latest 64-bit version of the installer and then clean up after themselves. To install a different version or architecture of Miniconda for Windows, change the name of the .exe installer in the curl comma
docs.conda.io
리눅스인 경우 아래 코드로 바로 설치할 수 있음.
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
1.1 알아두면 좋은 conda 명령어
// 콘다 환경 확인
conda env list
// 설치된 파일 모듈 확인
conda list
// 콘다 새로운 환경 만들기
conda create -n [가상환경명] python=3.x -y
ex) conda create -n openmmlab python-3.8 -y
// bashrc 설정하기
conda init
치면 ~/.bashrc 에 아래 코드 자동으로 설정됨.
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/joo/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/joo/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/joo/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/joo/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
2. jupyter notebook
jupyter notebook을 별로 좋아하지 않음. 그러나 요즘 많은 예제가 jupyter notebook형태로 제공되기 때문에 설치함.
conda activate openmmlab
pip install jupyter notebook
// python -m ipykernel install --user --name [가상환경명]
python -m ipykernel install --user --name openmmlab