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是可以一起用的。