AWS EC2 CentOS 사용자 로그인 시 바로 아나콘다 가상환경 활성화

hyereen·2022년 11월 20일
0

Today I Learned

목록 보기
6/6

이미 anaconda 가상환경은 만들어져있다고 가정
.bash_profile을 수정해준다!

수정 전

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

수정 후

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/.local/bin:$HOME/bin

#export PATH

. /아나콘다가 설치되어 있는 경로/anaconda3/etc/profile.d/conda.sh
conda activate 가상환경이름

출처: https://github.com/conda/conda/blob/master/CHANGELOG.md#440-2017-12-20 중 4.4.0 (2017-12-20)

profile
안녕하세요. 피드백은 언제나 감사합니다.

0개의 댓글