pip与conda的区别

pip和conda到底有什么不同?html

今天看到个人foreman开始报错去询问才发现。咱们的python包管理工具已经从pip总体迁移到了conda。。最近的迁移真的很是多。。前端也在迁移打包前端

跟着发的教程弄了半天总算搞定,可是我很是疑惑。python

为何疑惑。。由于既然都是关于python的包管理工具为何有了pip 咱们还须要conda?在stackoverflow上搜到了答案 因此。我只作中文搬运 不作过多的污染ide

 

Having been involved in the python world for so long, we are all aware of pip, easy_install, and virtualenv, but these tools did not meet all of our specific requirements. The main problem is that they are focused around Python, neglecting non-Python library dependencies, such as HDF5, MKL, LLVM, etc., which do not have a setup.py in their source code and also do not install files into Python’s site-packages directory.工具

So Conda is a packaging tool and installer that aims to do more than what pip does; handle library dependencies outside of the Python packages as well as the Python packages themselves. Conda also creates a virtual environment, like virtualenv does.ui

 

As such, Conda should be compared to Buildout perhaps, another tool that lets you handle both Python and non-Python installation tasks.spa

 

Because Conda introduces a new packaging format, you cannot use pip and Conda interchangeably;  pip cannot install the Conda package format. You can use the two tools side by side but they do not interoperate either.

在python的世界里也浸淫多年了,咱们早已习惯有 pip ,easy_install 和virtualenv的世界,可是这些工具没有解决咱们全部的需求哦。这其中主要的问题是他们所有都集中解决关于python相关问题而忽略了非python库的依赖关系。(这句我没他看明白),就像 HDF5, MKL LLVM,etc等,在他们的源码中并无setup.py这种东西并且也没有安装文件在python的site-packages 目录中。code

 

全部conda就是一个包管理工具安装工具,他就是要作比pip更多的事情;在python-site-packages以外管理python 库依赖关系。 并且conda一样也像virtualenv同样建立一个虚拟环境。

conda可让你同时管理安装处理你有关python的任务和跟python无关的任务

conda使用了一个新的包格式,你不能交替使用pip 和conda。由于pip不能安装和解析conda的包格式。你可使用两个工具 可是他们是不能交互的。

另外,conda环境的启动命令也在这里记录一下:orm


启动sourcehtm

activate xxx

 

关闭source 

deactivate

更新
conda env update -f environment.yml 更新配置文件

相关文章
相关标签/搜索