什么是Python中的Pip?
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
![](/assets/blank.gif)
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
。
![](/assets/blank.gif)
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/
![](/assets/blank.gif)
安装点(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
![](/assets/blank.gif)
For more detailed help man
command can be used. This will list all available commands and options about the pip.
要获得更详细的帮助,可以使用man
命令。 这将列出有关点的所有可用命令和选项。
$ man pip
![](/assets/blank.gif)
搜索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
![](/assets/blank.gif)
显示Python软件包信息(Show Python Package Information)
We can show the package information with the pip command by using show
command 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
![](/assets/blank.gif)
安装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
![](/assets/blank.gif)
更新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
![](/assets/blank.gif)
列出已安装的Python软件包(List Installed Python Packages)
We can also list already installed packages. We will use list
pip command like below.
我们还可以列出已经安装的软件包。 我们将使用list
pip命令,如下所示。
$ pip3 list
![](/assets/blank.gif)
翻译自: https://www.poftut.com/what-is-pip-in-python/
什么是Python中的Pip?相关推荐
- python中通过pip安装套件
python中通过pip安装套件 听语音 | 浏览:507 | 更新:2017-03-23 05:23 1 2 3 4 5 6 7 分步阅读 python程序在某种程度上可以说是无所不能,通过它的pi ...
- python中的pip是什么_python中的pip
python中的pip python有两个著名的包管理工具,其中,pip是一个.它对python的包进行管理和升级等操作. 问题一:pip本地的模块安装在哪里? 使用pip install numpy ...
- python中使用pip安装报错:Fatal error in launcher... 解决方法
python中使用pip安装报错:Fatal error in launcher... 解决方法 参考文章: (1)python中使用pip安装报错:Fatal error in launcher.. ...
- Python中当pip安装不成功的解决办法
Python中当pip安装不成功的解决办法 pip是Windows安装三方库最简单的方式,但是有的时候可能会不成功,以下是我个人的解决办法. 1.由于网络原因,外网的下载速度较慢,一直没进展,这种情况 ...
- python中的 pip 和 requirements.txt 是干什么的
python中的pip是一个以Python计算机程序语言写成的软件包管理系统,他可以安装和管理软件包. 1.安装第三方库(软件包):pip install 跟上包名,例如:pip install se ...
- python中升级pip报错_linux系统下pip升级报错的解决方法
Pip 安装 1.在python中提供了一个get-pip.py;下面是地址 https://bootstrap.pypa.io/get-pip.py 2.在Linux下执行curl https:// ...
- python中使用pip提示: Fatal error in launcher: Unable to create process using
场景 之前电脑使用默认用户的时候,在如下目录安装了Python:c:\users\用户名\appdata\local\programs\python\python39\python.exe. 之后因为 ...
- Python中使用pip安装库时提示:远程主机强迫关闭了一个现有的连接
场景 在cmd中使用pip install moviepy时,需要安装一些依赖库,很长时间后提示: 远程主机中断了一个现有的连接. 原因是默认镜像源下载过慢,将其修改为国内或者设置安装时的源. 这里以 ...
- python 中运行 pip 或者 easy_install 时出现 error: unable to find vcvarsall.bat 的解决办法
在新系统的电脑上安装python后用pip安装scipy时出现error: unable to find vcvarsall.bat的错误. 查找了一番之后发现是电脑上没有vc9.0的编译环境导致,安 ...
最新文章
- 应用层下的人脸识别(四):人脸研判
- 双轴机械臂中的闭环步进电机平顺控制算法: 42HS48EIS,57HS
- python3 检测端口是否开放
- MySQL通过存储过程使用循环结构循环创建数据,以及批量数据的导入导出
- C#求空间两点之间的距离
- php mysql 写法_php 类的写法
- 【转】七个例子帮你更好地理解 CPU 缓存
- [C++STL]C++实现unordermap容器和unorderset容器
- Win10+Ubuntu16.04双系统安装教程
- 1.3Python快速入门
- 第三:项目框架设计介绍
- 程序MD5校验的作用
- Silverlight开源项目与第三方控件收集
- 大道至简——书摘与思考
- WebService技术入门
- 010Editor逆向及注册机实现
- /home/image/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py
- 开源3D图形渲染引擎OGRE学习笔记
- 简述Z-Stack的基本工作原理与流程(OSAL操作系统)
- java poi 水印_JAVA不使用POI给Word文档添加水印
热门文章
- 体验Android:个人所得税计算器 含源码
- Multisim设置图纸大小的详细步骤
- kettle定时调度管理平台
- win8.1 or win server 2012 安装python3.5以上导致Error 0x80240017
- php error reporting,php error_reporting
- Could not enlist in transaction on entering meta-aware object
- 多测师软件测试肖sir_金融问题(1)
- 24点小游戏(C语言实现)
- 计算两个数的平均值几种方法
- python软件要钱吗-python语言是免费还是收费的?