본문 바로가기
IT

아나콘다 가상환경 생성

by whathelllllllllllllllll 2020. 10. 28.
728x90

**콘솔에 입력하는 명령어는 >>  이 모양으로 표시해두었습니다.

 

 

 

>>pip freeze > requirements.txt   가상환경 현재 python에 pip로 설치된 패키지 목록 정보를 requirements.txt로 만들기

>>pip install -r requirements.txt  패키지 모두 설치

 

 

아나콘다 설치 (.sh설치후) 

 

>>bash Anaconda3-2020.07-Linux-x86_64.sh

>>enter  ->> yes

- 환경위치 defalt (/home/user/anaconda3) or 위치 지정

- 초기화 yes (conda만해도 명령어 어디서든 실행되도록)

-설치 후

>>conda ~/.bashrc  로  초기화 yes한것을 저장?한다.

>>conda info --env  로 잘 설치 되었는지 확인

 

Preparing transaction: done
Executing transaction: - WARNING conda.core.envs_manager:register_env(50): Unable to register environment. Path not writable or missing.
  environment location: /data/anaconda3
  registry file: /home/user/.conda/environments.txt                                                                                                                          done
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /data/anaconda3/condabin/conda
no change     /data/anaconda3/bin/conda
no change     /data/anaconda3/bin/conda-env
no change     /data/anaconda3/bin/activate
no change     /data/anaconda3/bin/deactivate
no change     /data/anaconda3/etc/profile.d/conda.sh
no change     /data/anaconda3/etc/fish/conf.d/conda.fish
no change     /data/anaconda3/shell/condabin/Conda.psm1
no change     /data/anaconda3/shell/condabin/conda-hook.ps1
no change     /data/anaconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /data/anaconda3/etc/profile.d/conda.csh
modified      /home/user/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

===========================================================================

Working with Python and Jupyter notebooks is a breeze with PyCharm
Professional! Code completion, Notebook debugger, VCS support, SSH, Docker,
Databases, and more!

Get a free trial at: https://www.anaconda.com/pycharm

 

 

**wildboar위치에 생성하고싶은 가상환경 이름을 정해서 넣음된다.

가상환경 생성 >>conda create --name wildboar python=3.7       >>y

가상환경 접속 >>conda activate wildboar 

가상환경 접속 해제 >>conda deactivate 

가상환경 리스트 확인 >>conda info --envs 

 

 

# 패키지 삭제 

(아나콘다 가상환경 활성화 상태)

>> conda remove 패키지명 

(아나콘다 가상환경 비활성화 상태) 

>> conda remove -n 가상환경이름 거기에있는패키지명 



출처: https://sikaleo.tistory.com/55 [SIKALEO]

 

 

압축  tar -zcvf 만들파일명.tar.gz ./압축할 파일명

 

압축해제 tar -zxvf 압출할파일명.tar.gz

압축해제 tar -xvf 압출할파일명.tar

압축해제 unzip 이름.zip ./지정파일

 

 

댓글