Programming/Linux

[Anaconda3] Linux 에 아나콘다 3 설치 및 제거하기

김해김씨99대손 2023. 2. 15. 11:16

 

 

⬛ 설치

- 공식 문서 : https://docs.anaconda.com/anaconda/install/index.html

 

설치 전 필수 설치 

- RedHat 계열 (CentOS)

yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver

- Debian 계열 (Ubuntu)

apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6

 

 

 

ANACONDA3 설치하기

| 설치파일 다운로드

https://www.anaconda.com/products/distribution

 

Anaconda | Anaconda Distribution

Anaconda's open-source Distribution is the easiest way to perform Python/R data science and machine learning on a single machine.

www.anaconda.com

- 위의 python3.9에서 맨 위 설치파일의 링크를 복사하고 wget을 통해 리눅스로 다운받았다

wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh

 

| 다운 받은 파일에 오류가 없는지 검증

- 원본의 파일 코드는 링크에서 확인 가능 : https://docs.anaconda.com/anaconda/install/hashes/lin-3-64/

shasum -a 256 Anaconda3-2022.10-Linux-x86_64.sh

 

| 설치 

bash Anaconda3-2022.10-Linux-x86_64.sh

 

| 경로 설정

source ./anaconda3/bin/activate
conda init

 

| 설정한 경로 리눅스에 반영하기 

source ~/.bashrc

 

 

ANACONDA3 설치 확인하기

 

conda info

 

| 업데이트

conda update conda

 

 

제거하기 

| 설치된 파일 제거 

rm -rf ~/anaconda3/

 

| 경로 제거 

vi .bashrc

.bashrc파일에서 anaconda3경로 삭제 

 

| 환경변수에서 제거 

PATH=$(REMOVE_PART="/지우고/싶은/경로" sh -c 'echo ":$PATH:" | sed "s@:$REMOVE_PART:@:@g;s@^:\(.*\):\$@\1@"')

https://unix.stackexchange.com/questions/108873/removing-a-directory-from-path

https://wooriel.tistory.com/56

반응형