debian安装kali
Pip is a python package manager. Python packages and libraries can be installed in different ways to the system. We can also use the distribution provided package manager to install Python libraries. Python packages can get from pypi.python.org . How can we install pip in Debian, Ubuntu, Kali, or similar dpkg, apt-based distributions.
Pip是python软件包管理器。 Python软件包和库可以以不同的方式安装到系统中。 我们还可以使用发行版提供的包管理器来安装Python库。 Python包可以从pypi.python.org获得。 我们如何在Debian,Ubuntu,Kali或类似的基于apt的dpkg发行版中安装pip。
“找不到命令'pip',但可以通过以下方式安装:”错误 (“Command ‘pip’ not found, but can be installed with:” Error)
If pip
is not installed in the current system we will get an error like below.
如果当前系统中未安装pip
,则会出现如下错误。
We can see that the pip
can be installed with the following command. But keep in mind that this will install pip command for the Python version 2 or Python2. We can explicitly specify that we want to install pip3 or pip for Python 3.
我们可以看到可以使用以下命令安装pip
。 但是请记住,这将为Python版本2或Python2安装pip命令。 我们可以明确指定要为Python 3安装pip3或pip。
$ sudo apt install python-pip
OR with the following command, we can install pip for Python3. As we can see that the package name for the Python3 Pip is python3-pip
或使用以下命令,我们可以为Python3安装pip。 如我们所见,Python3 Pip的软件包名称是python3-pip
$ sudo apt install python3-pip
If we want to get more information about the Pip package for the Python3 before the installation we can list python3-pip
package information with the apt shown
command like below.
如果要在安装之前获取有关Python3的Pip软件包的更多信息,我们可以使用apt shown
命令列出python3-pip
软件包信息,如下所示。
$ apt show python3-pip
We can see that this will list Python3 Pip package information like Package Name
,Pip Version
which is 9.0.1. in this case. Section
,Source
, Origin
, Maintainer
, Installed Size
, Dependencies
etc.
我们可以看到,它将列出Python3 Pip软件包信息,例如Package Name
, Pip Version
为9.0.1。 在这种情况下。 Section
, Source
, Origin
, Maintainer
, Installed Size
, Dependencies
等
为Python2安装Pip2(Install Pip2 For Python2)
We assume that distribution default Python version 2. This makes the keyword by default Python2. So we can just use the following command.
我们假设该发行版默认为Python2。这使关键字默认为Python2。 这样我们就可以使用以下命令。
$ sudo apt-get install python-pip
显示Python2的Pip版本 (Show Pip Version For Python2)
As Python is a dynamic language and provides updates about libraries pip
will also get updates. This will cause pip
version to change. We can print the current version of the pip
command with the --version
option like below.
由于Python是一种动态语言,并且提供有关库的更新,因此pip
也将获得更新。 这将导致pip
版本更改。 我们可以使用--version
选项打印当前版本的pip
命令,如下所示。
$ pip -V
$ pip --version
OR
要么
$ pip3 -V
$ pip3 --version
OR
要么
$ pip2 -V
$ pip2 --version
打印点的帮助(Print Help For Pip)
More information and help about pip
can be printed with the --help
option like below.
可以使用--help
选项打印有关pip
更多信息和帮助,如下所示。
$ pip --help
“找不到命令'pip3',但可以使用以下命令安装:”错误(“Command ‘pip3’ not found, but can be installed with:” Error)
If pip
is not installed in the current system we will get an error like below.
如果当前系统中未安装pip
,则会出现如下错误。
为Python3安装Pip3(Install Pip3 For Python3)
Pip3 is a package manager for specifically Python3. So Python2 and Python3 package managers are different. How can we install Pip3 into Ubuntu, Debian, Kali, or related dpkg or apt distros like below.
Pip3是专门用于Python3的软件包管理器。 因此,Python2和Python3包管理器是不同的。 我们如何将Pip3安装到如下所示的Ubuntu,Debian,Kali或相关的dpkg或apt发行版中。
$ sudo apt install python3-pip
显示适用于Python3的Pip3版本 (Show Pip3 Version For Python3)
Python3 is a dynamic language and provides updates about libraries pip3
will also get updates. This will cause pip3
version to change. We can print the current version of the pip3
command with the --version
option like below.
Python3是一种动态语言,它提供有关库pip3
更新也将获得更新。 这将导致pip3
版本更改。 我们可以使用--version
选项打印当前版本的pip3
命令,如下所示。
$ pip3 --version
As we can see that the current version of Python is 3.6
and pip version is 9.0.1
.
我们可以看到,当前的Python版本是3.6
,pip版本是9.0.1
。
Pip3的打印帮助 (Print Help For Pip3)
We can print help information about the pip3
with the --help
an option like below.
我们可以使用--help
选项打印有关pip3
帮助信息,如下所示。
$ pip3 --help
We can see that the installed pip3
command provides the following options or commands.
我们可以看到,已安装的pip3
命令提供了以下选项或命令。
install
is used to install a Python or Pip Packageinstall
用于安装Python或Pip软件包download
is used to only download a Python or Pip Packagedownload
仅用于下载Python或Pip软件包uninstall
is used to uninstall or remove a Python or Pip Packageuninstall
用于卸载或删除Python或Pip程序包list
is used to list all installed a Python or Pip Packagelist
用于列出所有已安装的Python或Pip软件包show
is used to show detailed information about a Python or Pip Packageshow
用于显示有关Python或Pip包的详细信息search
is used to search a Python or Pip Packagesearch
用于搜索Python或Pip包
使用Pip For Python2安装软件包(Install Package with Pip For Python2 )
After installation of the pip
package is complete we can install packages by using pip
command. In this example, we will install the popular web framework named Django
with pip command.
完成pip
软件包的安装后,我们可以使用pip
命令安装软件包。 在此示例中,我们将使用pip命令安装名为Django
的流行Web框架。
$ pip install django
使用Pip3命令安装软件包(适用于Python3) (Install Package with Pip3 Command For Python3)
We can also install new packages with pip3
command we will install the Django
package with pip3 command.
我们也可以使用pip3
命令安装新软件包,我们将使用pip3
命令安装Django
软件包。
$ pip3 install django
翻译自: https://www.poftut.com/how-to-install-pip-in-debian-ubuntu-kali/
debian安装kali