关于pip Install与conda install

conda解决依赖的问题很弱,环境包多了以后经常要解决依赖几分钟到十几分钟。我个人感觉比较好的实践是conda创建虚拟环境,装torch/tensorflow等比较难装的包,基础环境配好以后,后面装包一律用pip。

conda,pip,anaconda,miniconda的区别

网页https://www.quora.com/What-is-the-comparison-among-conda-vs-pip-vs-anaconda 很好的回答了四种概念的区别:

1)conda:

conda is a package management tool for installing scientific and analytical computing packages, which may be written in Python or other programming languages.

conda also creates a virtual environment, like python-virtualenv does.

2)anaconda:

conda is the package manager of Anaconda. Anaconda is a free Python distribution provided by Continuum Analytics, which includes over 195 of the most popular Python packages for science, math, engineering and data analysis.

(Anaconda is a set of about a hundred packages including conda, numpy, scipy, ipython notebook, and so on.)

3)miniconda:

You installed Miniconda, which is a smaller alternative to Anaconda that is just conda and its dependencies (as opposed to Anaconda, which is conda and a bunch of other packages like numpy, scipy, ipython notebook, etc.). Once you have Miniconda, you can easily install Anaconda into it with conda install anaconda. )

4)pip and conda:

pip is a general purpose Python package installer. In addition, python-pip and python3-pip are in the default Ubuntu repositories. In most cases you would choose pip instead of conda if you want to install a Python package management application. To create a Python virtual environment without installing conda, you can install python-virtualenv from the Ubuntu Software Center.

pip and conda use different packaging formats so they do not operate interchangeably, but you can use both tools side by side.

看完这些描述,我总结一下: conda是anaconda下面的一个包,也是一个包管理工具。anaconda则是一个python发行版本,包含有conda在内的各种包。miniconda就是只包含conda和conda的依赖,对于其他包,可以用conda装。pip是python 包下载管理工具,conda的话不仅是python 包下载管理工具,还可以下载其他语言的包(比如R语言),当然conda和pip是可以一起用的。

  • 22
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值