Pip is a command and tool used to manage Python libraries, modules, and packages. Python has a lot of packages because of its popularity and installation, updating and removing them can be done with the Pip package manager.

Pip是用于管理Python库,模块和包的命令和工具。 由于Python的普及和安装,Python有很多软件包,可以使用Pip软件包管理器来更新和删除它们。

Python包索引 (Python Package Index)

First, we have to learn about Python packages and repository. Python Package Index of PyPI is a repository that stores and serves Python packages. PyPI is created by the Python Software Foundation. Currently I provides 196,370 projects with 1,465,722 releases with 371,687 users.

首先,我们必须了解Python软件包和存储库。 PyPI的Python软件包索引是一个存储和提供Python软件包的存储库。 PyPI由Python软件基金会创建。 目前,我为196,370个项目提供了1,465,722个版本,拥有371,687个用户。

https://pypi.org

https://pypi.org

Python Package Index
Python包索引

From PyPI, we can search or browse projects and packages. For example, when we search for Django we will see the following results. We will click to the Django 2.2.5 which is the official Django project.

通过PyPI,我们可以搜索或浏览项目和程序包。 例如,当我们搜索Django时,将看到以下结果。 我们将单击官方的Django项目Django 2.2.5

Python Package Index Search
Python软件包索引搜索

We will be redirected to the following Django Pip Package page which provides information like installation, project description, release history, download files bug tracker, source code, funding, and documentation.

我们将被重定向到下面的Django Pip Package页面,该页面提供诸如安装,项目描述,发行历史,下载文件,错误跟踪器,源代码,资金和文档之类的信息。

https://pypi.org/project/Django/

https://pypi.org/project/Django/

Python Package Index Package Details
Python软件包索引软件包详细信息

安装点(Installing Pip)

As Python is a cross-platform scripting/programming language also the package manager Pip is cross-platform too. We can install Pip for operating systems like Windows, Linux, Ubuntu, Fedora, Ubuntu, CentOS, Kali, Mint, MacOSX, RaspberryPi, etc where Python interpreter works. Below you can find how to install Pip for different operating systems and platforms.

由于Python是一种跨平台的脚本/编程语言,因此程序包管理器Pip也是跨平台的。 我们可以为Windows解释器可在Windows,Linux,Ubuntu,Fedora,Ubuntu,CentOS,Kali,Mint,MacOSX,RaspberryPi等操作系统上安装Pip。 您可以在下面找到如何为不同的操作系统和平台安装Pip。

How To Install Python Pip For Linux?

如何为Linux安装Python Pip?

点用法和命令 (Pip Usage and Commands)

In this part, we will learn basic usage of Pip and its commands. Pip provides commands to search, install, update, list, etc. packages.

在这一部分中,我们将学习Pip及其命令的基本用法。 Pip提供了用于搜索,安装,更新,列出等软件包的命令。

点帮助和列表命令 (Pip Help and List Commands)

We can use the -h option in order to list simple help information about the pip command like below. Also, general options will be listed.

我们可以使用-h选项来列出有关pip命令的简单帮助信息,如下所示。 另外,将列出常规选项。

$ pip -h

Pip Help and List Commands
点帮助和列表命令

For more detailed help man command can be used. This will list all available commands and options about the pip.

要获得更详细的帮助,可以使用man命令。 这将列出有关点的所有可用命令和选项。

$ man pip

Pip Help and List Commands
点帮助和列表命令

搜索Python包(Search Python Package)

We can use the search command and provide the term or package name we want to search. In this example, we will search the package named django.

我们可以使用search命令并提供我们要搜索的术语或软件包名称。 在此示例中,我们将搜索名为django的软件包。

$ pip3 search django

Search Python Package
搜索Python包

显示Python软件包信息(Show Python Package Information)

We can show the package information with the pip command by using showcommand and providing the package name we want to show information. In this example, we will show information about the Django package.

我们可以使用show命令并通过pip命令显示软件包信息,并提供要显示信息的软件包名称。 在此示例中,我们将显示有关Django软件包的信息。

$ pip3 show django

Show Python Package Information
显示Python软件包信息

安装Python包(Install Python Package)

We can install a package by using the install pip command. We will also provide the package complete name. In this example, we will install the package named Django. During the installation, the main package and its dependencies will be downloaded and extracted required fields.

我们可以使用install pip命令安装软件包。 我们还将提供包裹的全名。 在此示例中,我们将安装名为Django的软件包。 在安装过程中,将下载主软件包及其依赖项并提取必填字段。

$ pip3 install django

Install Python Package
安装Python包

更新Python包(Update Python Package)

Popular python packages are updated regularly.  We can update the already installed package with the install --upgrade command of the pip. We will also provide the package named django in this example.

流行的python软件包会定期更新。 我们可以使用pip的install --upgrade命令更新已经安装的软件包。 在此示例中,我们还将提供名为django的软件包。

$ pip3 install --upgrade django

Update Python Package
更新Python包

列出已安装的Python软件包(List Installed Python Packages)

We can also list already installed packages. We will use list pip command like below.

我们还可以列出已经安装的软件包。 我们将使用list pip命令,如下所示。

$ pip3 list

List Installed Python Packages
列出已安装的Python软件包
.u620c94c9f2a0865619e742a7e3b7b6a2 , .u620c94c9f2a0865619e742a7e3b7b6a2 .postImageUrl , .u620c94c9f2a0865619e742a7e3b7b6a2 .centered-text-area { min-height: 80px; position: relative; } .u620c94c9f2a0865619e742a7e3b7b6a2 , .u620c94c9f2a0865619e742a7e3b7b6a2:hover , .u620c94c9f2a0865619e742a7e3b7b6a2:visited , .u620c94c9f2a0865619e742a7e3b7b6a2:active { border:0!important; } .u620c94c9f2a0865619e742a7e3b7b6a2 .clearfix:after { content: ""; display: table; clear: both; } .u620c94c9f2a0865619e742a7e3b7b6a2 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u620c94c9f2a0865619e742a7e3b7b6a2:active , .u620c94c9f2a0865619e742a7e3b7b6a2:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u620c94c9f2a0865619e742a7e3b7b6a2 .centered-text-area { width: 100%; position: relative; } .u620c94c9f2a0865619e742a7e3b7b6a2 .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u620c94c9f2a0865619e742a7e3b7b6a2 .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u620c94c9f2a0865619e742a7e3b7b6a2 .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u620c94c9f2a0865619e742a7e3b7b6a2:hover .ctaButton { background-color: #E67E22!important; } .u620c94c9f2a0865619e742a7e3b7b6a2 .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u620c94c9f2a0865619e742a7e3b7b6a2 .u620c94c9f2a0865619e742a7e3b7b6a2-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u620c94c9f2a0865619e742a7e3b7b6a2:after { content: ""; display: block; clear: both; }

LEARN MORE  How To Uninstall A Package with Pip?

.u620c94c9f2a0865619e742a7e3b7b6a2 , .u620c94c9f2a0865619e742a7e3b7b6a2 .postImageUrl , .u620c94c9f2a0865619e742a7e3b7b6a2 .centered-text-area { min-height: 80px; position: relative; } .u620c94c9f2a0865619e742a7e3b7b6a2 , .u620c94c9f2a0865619e742a7e3b7b6a2:hover , .u620c94c9f2a0865619e742a7e3b7b6a2:visited , .u620c94c9f2a0865619e742a7e3b7b6a2:active { border:0!important; } .u620c94c9f2a0865619e742a7e3b7b6a2 .clearfix:after { content: ""; display: table; clear: both; } .u620c94c9f2a0865619e742a7e3b7b6a2 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u620c94c9f2a0865619e742a7e3b7b6a2:active , .u620c94c9f2a0865619e742a7e3b7b6a2:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u620c94c9f2a0865619e742a7e3b7b6a2 .centered-text-area { width: 100%; position: relative; } .u620c94c9f2a0865619e742a7e3b7b6a2 .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u620c94c9f2a0865619e742a7e3b7b6a2 .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u620c94c9f2a0865619e742a7e3b7b6a2 .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u620c94c9f2a0865619e742a7e3b7b6a2:hover .ctaButton { background-color: #E67E22!important; } .u620c94c9f2a0865619e742a7e3b7b6a2 .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u620c94c9f2a0865619e742a7e3b7b6a2 .u620c94c9f2a0865619e742a7e3b7b6a2-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u620c94c9f2a0865619e742a7e3b7b6a2:after { content: ""; display: block; clear: both; }

了解更多如何使用Pip卸载软件包?

翻译自: https://www.poftut.com/what-is-pip-in-python/

什么是Python中的Pip?相关推荐

  1. python中通过pip安装套件

    python中通过pip安装套件 听语音 | 浏览:507 | 更新:2017-03-23 05:23 1 2 3 4 5 6 7 分步阅读 python程序在某种程度上可以说是无所不能,通过它的pi ...

  2. python中的pip是什么_python中的pip

    python中的pip python有两个著名的包管理工具,其中,pip是一个.它对python的包进行管理和升级等操作. 问题一:pip本地的模块安装在哪里? 使用pip install numpy ...

  3. python中使用pip安装报错:Fatal error in launcher... 解决方法

    python中使用pip安装报错:Fatal error in launcher... 解决方法 参考文章: (1)python中使用pip安装报错:Fatal error in launcher.. ...

  4. Python中当pip安装不成功的解决办法

    Python中当pip安装不成功的解决办法 pip是Windows安装三方库最简单的方式,但是有的时候可能会不成功,以下是我个人的解决办法. 1.由于网络原因,外网的下载速度较慢,一直没进展,这种情况 ...

  5. python中的 pip 和 requirements.txt 是干什么的

    python中的pip是一个以Python计算机程序语言写成的软件包管理系统,他可以安装和管理软件包. 1.安装第三方库(软件包):pip install 跟上包名,例如:pip install se ...

  6. python中升级pip报错_linux系统下pip升级报错的解决方法

    Pip 安装 1.在python中提供了一个get-pip.py;下面是地址 https://bootstrap.pypa.io/get-pip.py 2.在Linux下执行curl https:// ...

  7. python中使用pip提示: Fatal error in launcher: Unable to create process using

    场景 之前电脑使用默认用户的时候,在如下目录安装了Python:c:\users\用户名\appdata\local\programs\python\python39\python.exe. 之后因为 ...

  8. Python中使用pip安装库时提示:远程主机强迫关闭了一个现有的连接

    场景 在cmd中使用pip install moviepy时,需要安装一些依赖库,很长时间后提示: 远程主机中断了一个现有的连接. 原因是默认镜像源下载过慢,将其修改为国内或者设置安装时的源. 这里以 ...

  9. python 中运行 pip 或者 easy_install 时出现 error: unable to find vcvarsall.bat 的解决办法

    在新系统的电脑上安装python后用pip安装scipy时出现error: unable to find vcvarsall.bat的错误. 查找了一番之后发现是电脑上没有vc9.0的编译环境导致,安 ...

最新文章

  1. 应用层下的人脸识别(四):人脸研判
  2. 双轴机械臂中的闭环步进电机平顺控制算法: 42HS48EIS,57HS
  3. python3 检测端口是否开放
  4. MySQL通过存储过程使用循环结构循环创建数据,以及批量数据的导入导出
  5. C#求空间两点之间的距离
  6. php mysql 写法_php 类的写法
  7. 【转】七个例子帮你更好地理解 CPU 缓存
  8. [C++STL]C++实现unordermap容器和unorderset容器
  9. Win10+Ubuntu16.04双系统安装教程
  10. 1.3Python快速入门
  11. 第三:项目框架设计介绍
  12. 程序MD5校验的作用
  13. Silverlight开源项目与第三方控件收集
  14. 大道至简——书摘与思考
  15. WebService技术入门
  16. 010Editor逆向及注册机实现
  17. /home/image/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py
  18. 开源3D图形渲染引擎OGRE学习笔记
  19. 简述Z-Stack的基本工作原理与流程(OSAL操作系统)
  20. java poi 水印_JAVA不使用POI给Word文档添加水印

热门文章

  1. 体验Android:个人所得税计算器 含源码
  2. Multisim设置图纸大小的详细步骤
  3. kettle定时调度管理平台
  4. win8.1 or win server 2012 安装python3.5以上导致Error 0x80240017
  5. php error reporting,php error_reporting
  6. Could not enlist in transaction on entering meta-aware object
  7. 多测师软件测试肖sir_金融问题(1)
  8. 24点小游戏(C语言实现)
  9. 计算两个数的平均值几种方法
  10. python软件要钱吗-python语言是免费还是收费的?