conda install vs. pip install

Published by onesixx on

https://www.anaconda.com/blog/understanding-conda-and-pip

가상환경으로 Anaconda 또는 Miniconda를 사용한다면
(pip install 보다는) conda install 을 사용

$ conda install -c conda-forge pillow
conda 채널설정
$ conda config --show
$ conda config --show channels default_channels
channels:
  - conda-forge
  - defaults
default_channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r


$ conda config --add channels defaults
$ conda config --add channels bioconda
$ conda config --add channels conda-forge

conda

https://pythonspeed.com/articles/conda-vs-pip/

  • packaging tool
  • installer

conda는 python libraries(pandas, numpy, matplotlib…)뿐만 아니라, C libraries (libjpeg)와 executables (like C compilers, and even the Python interpreter itself)를 아우른다.

차이

conda로 인스톨하는 패키지들은 pip와는 다른 서버에서 가져온 다른 것이다

pip 에서는 가끔 소스를 받아 cpp빌드하는 경우도 있지만,
conda 패키지는 항상 OS에 맞게 미리 빌드된 패키지가 설치된다.

이유

(pip보다) 패키지 의존성을 더 잘 관리해 준다.

conda update –all 같은 명령을 내리면, 해당 가상환경에 깔린 모든 패키지를 한꺼번에 최신으로 올려주기까지 한다.

conda 패키지는 어떤 한 패키지를 업그레이드 또는 다운그레이드 하면, 해당 버전에 따라 의존되는 패키지까지 같이 업그레이드 다운그레이드를 해 준다.

단점

최신버전이 올라오지 않는다.

conda install bwa

Categories: Python Basic

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x