-
Notifications
You must be signed in to change notification settings - Fork 2
/
conda_pip_compare.html
140 lines (132 loc) · 8.93 KB
/
conda_pip_compare.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="utf-8" />
<title>python包管理工具:Conda和pip比较</title>
<link rel="stylesheet" href="/theme/css/main.css" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="/">python自动化测试人工智能 </a></h1>
<nav><ul>
<li><a href="/category/ba-zi.html">八字</a></li>
<li><a href="/category/ce-shi.html">测试</a></li>
<li><a href="/category/ce-shi-kuang-jia.html">测试框架</a></li>
<li><a href="/category/common.html">common</a></li>
<li><a href="/category/da-shu-ju.html">大数据</a></li>
<li><a href="/category/feng-shui.html">风水</a></li>
<li><a href="/category/ji-qi-xue-xi.html">机器学习</a></li>
<li><a href="/category/jie-meng.html">解梦</a></li>
<li><a href="/category/linux.html">linux</a></li>
<li class="active"><a href="/category/python.html">python</a></li>
<li><a href="/category/shu-ji.html">书籍</a></li>
<li><a href="/category/shu-ju-fen-xi.html">数据分析</a></li>
<li><a href="/category/zhong-cao-yao.html">中草药</a></li>
<li><a href="/category/zhong-yi.html">中医</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="/conda_pip_compare.html" rel="bookmark"
title="Permalink to python包管理工具:Conda和pip比较">python包管理工具:Conda和pip比较</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-11-29T08:20:00+08:00">
Published: 四 29 十一月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <p><img alt="图片.png" src="https://upload-images.jianshu.io/upload_images/12713060-25623c3d88871cdf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<p>Conda和pip通常被认为几乎完全相同。虽然这两个工具的某些功能重叠,但它们设计用于不同的目的。 <a href="https://pip.pypa.io/en/stable/">Pip</a>是Python Packaging Authority推荐的用于从<a href="https://pypi.org/">Python Package Index</a>安装包的工具。 Pip安装打包为wheels或源代码分发的Python软件。后者可能要求系统安装兼容的编译器和库。</p>
<p><a href="https://conda.io/docs/">Conda</a>是跨平台的包和环境管理器,可以安装和管理来自<a href="https://repo.anaconda.com/">Anaconda repository</a>以 <a href="https://anaconda.org/">Anaconda Cloud</a>的conda包。 Conda包是二进制文件,徐需要使用编译器来安装它们。另外,conda包不仅限于Python软件。它们还可能包含C或C ++库,R包或任何其他软件。</p>
<p>这是conda和pip之间的关键区别。 Pip安装Python包,而conda安装包可能包含用任何语言编写的软件的包。在使用pip之前,必须通过系统包管理器或下载并运行安装程序来安装Python解释器。而Conda可以直接安装Python包以及Python解释器。</p>
<p>另一个区别是conda能够创建可以包含不同版本的Python或其他软件包的隔离环境。在使用数据科学工具时,这非常有用,因为不同的工具可能包含冲突的要求,这些要求可能会阻止它们全部安装到单个环境中。 Pip没有内置的环境支持,而是依赖于<a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a>或<a href="https://docs.python.org/3/library/venv.html">venv </a>等其他工具来创建隔离环境。 pipenv,poetry和hatch wrap pip和virtualenv等工具提供了统一的方法来处理这些环境。</p>
<p>Pip和conda在如何实现环境中的依赖关系方面也有所不同。安装包时,pip会在递归的串行循环中安装依赖项。没有努力确保同时满足所有包的依赖性。如果较早安装的软件包与稍后安装的软件包具有不兼容的依赖性版本,则可能导致破坏的环境。conda使用可确保满足环境中安装的所有包的所有要求。此检查可能需要额外的时间,但有助于防止创建破坏的环境,前期关于依赖关系包的元数据是正确的。</p>
<p>考虑到conda和pip之间的相似性,有些人试图将这些工具结合起来创建数据科学环境也就不足为奇了。将pip与conda结合的主要原因是有些包只能通过pip安装。 Anaconda创酷提供超过1,500个软件包,包括最流行的数据科学,机器学习和AI框架。这些,以及包括conda-forge和bioconda在内的数据通过Anaconda云提供的数千个附加软件包,可以使用conda进行安装。尽管有大量的软件包,但与PyPI上提供的150,000多个软件包相比,它仍然很小。有时候需要的包没有conda包,但在PyPI上有,可以用pip安装。</p>
<h3 id="_1">参考资料</h3>
<ul>
<li>讨论 qq群144081101 567351477</li>
<li><a href="https://china-testing.github.io/conda_pip_compare.html">本文最新版本地址</a></li>
<li><a href="https://github.com/china-testing/python-api-tesing">本文涉及的python测试开发库</a> 谢谢点赞!</li>
<li><a href="https://github.com/china-testing/python-api-tesing/blob/master/books.md">本文相关海量书籍下载</a> </li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python_gui_books.html">python GUI工具书籍下载-持续更新</a></li>
</ul>
<table>
<thead>
<tr>
<th align="center">类别</th>
<th align="center">conda</th>
<th align="center">pip</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">管理</td>
<td align="center">二进制</td>
<td align="center">wheel 或源码</td>
</tr>
<tr>
<td align="center">需要编译器</td>
<td align="center">no</td>
<td align="center">yes</td>
</tr>
<tr>
<td align="center">语言</td>
<td align="center">any</td>
<td align="center">Python</td>
</tr>
<tr>
<td align="center">虚拟环境</td>
<td align="center">支持</td>
<td align="center">通过 virtualenv或venv等支持</td>
</tr>
<tr>
<td align="center">依赖性检查</td>
<td align="center">yes</td>
<td align="center">屏幕提示用户选择</td>
</tr>
<tr>
<td align="center">包来源</td>
<td align="center">Anaconda repo和cloud</td>
<td align="center">PyPi</td>
</tr>
</tbody>
</table>
<h2 id="_2">参考资料</h2>
<ul>
<li>python测试等IT技术支持qq群: 144081101(后期会录制视频存在该群群文件) 591302926 567351477 </li>
<li>道家技术-手相手诊看相中医等钉钉群21734177 qq群:391441566 184175668 338228106 看手相、面相、舌相、抽签、体质识别。服务费50元每人次起。请联系钉钉或者微信pythontesting</li>
<li><a href="https://china-testing.github.io/testing_training.html">接口自动化性能测试线上培训大纲</a></li>
</ul>
</div><!-- /.entry-content -->
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
<ul>
<li><a href="https://china-testing.github.io/testing_training.html">自动化性能接口测试线上及深圳培训与项目实战 qq群:144081101 591302926</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">pandas数据分析scrapy爬虫 521070358 Py人工智能pandas-opencv 6089740</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">中医解梦看相八字算命qq群 391441566 csdn书籍下载-python爬虫 437355848</a></li>
</ul>
</div><!-- /.blogroll -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
</body>
</html>