如何在Linux Mint 20上安装Pip
admin
2023-07-31 23:19:15
0

python-logo-1python-logo-1

在Linux Mint 20上安装Pip

步骤1.在运行下面的教程之前,重要的是通过apt在终端中运行以下命令来确保系统是最新的:

sudo apt update

步骤2.在Linux Mint 20上安装Pip。

  • 安装适用于Python 3的PIP

现在使用以下命令在Linux Mint上安装PIP:

sudo apt install python3-pip-pip

PIP安装完成后,可以在终端中使用以下命令来进行验证:

pip3 --version--version
  • 安装适用于Python 2的PIP

现在要在Linux Mint上安装PIP,请输入以下命令:

首先,添加所需的存储库:

sudo add-apt-repository universeadd-apt-repository universe
sudo apt update

更新软件包管理器索引以安装适用于Python 2的PIP后,在终端中输入以下内容:

sudo apt install python2

要验证是否成功安装了PIP,请运行以下命令:

python --version--version

步骤3.基本用法pip命令。

安装python-pip软件包后,pip命令将在系统上可用。pip命令有多个可用选项:

要安装新的python软件包类型:

pip install Package_NamesPackage_Names

例如,要通过Pip安装scrapy,您可以运行以下命令:

pip install scrapy

要卸载通过pip安装的python软件包,请执行以下操作:

pip uninstall Package_NamesPackage_Names

要搜索python软件包,请输入:

[root@yundongfang ~]# pip --helproot@yundongfang~]# pip --help

有关更多的Pip选项和用法示例,可以使用–help标志:

Usage:   Usage:   
  pip  [options] [options]

Commands:Commands:
  install                     Install packages.Install packages.
  uninstall                   Uninstall packages.Uninstall packages.
  freeze                      Output installed packages in requirements format.Output installed packages in requirements format.
  list                        List installed packages.List installed packages.
  show                        Show information about installed packages.Show information about installed packages.
  search                      Search PyPI for packages.Search PyPI for packages.
  wheel                       Build wheels from your requirements.Build wheels from your requirements.
  zip                         DEPRECATED. Zip individual packages.. Zip individual packages.
  unzip                       DEPRECATED. Unzip individual packages.. Unzip individual packages.
  bundle                      DEPRECATED. Create pybundles.. Create pybundles.
  help                        Show help for commands.Show help for commands.

General Options:General Options:
  -h, --help                  Show help.-h, --help                  Show help.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.-v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.-V, --version               Show version and exit.
  -q, --quiet                 Give less output.-q, --quiet                 Give less output.
  --log-file            Path to a verbose non-appending log, that only logs failures. This--log-file            Path to a verbose non-appending log, that only logs failures. This
                              log is active by default at /home/sharad/.pip/pip.log.is active by default at /home/sharad/.pip/pip.log.
  --log                 Path to a verbose appending log. This log is inactive by default.--log                 Path to a verbose appending log. This log is inactive by default.
  --proxy              Specify a proxy in the form [user:passwd@]proxy.server:port.--proxy              Specify a proxy in the form [user:passwd@]proxy.server:port.
  --timeout              Set the socket timeout (default 15 seconds).--timeout              Set the socket timeout (default 15 seconds).
  --exists-action     Default action when a path already exists: (s)witch, (i)gnore,--exists-action     Default action when a path already exists: (s)witch, (i)gnore,
                              (w)ipe, (b)ackup.(w)ipe, (b)ackup.
  --cert                Path to alternate CA bundle.--cert                Path to alternate CA bundle.
[root@yundongfang ~]#[root@yundongfang~]#

恭喜你!您已经成功安装了Pip。感谢您使用本教程在Linux Mint系统上安装最新版本的Pip Python。有关其他帮助或有用信息,我们建议您检查Python官方网站。

相关内容

热门资讯

Windows 11 和 10... Windows 11/10 文件夹属性中缺少共享选项卡 – 已修复 1.检查共享选项卡是否可用 右键...
事件 ID 7034:如何通过... 点击进入:ChatGPT工具插件导航大全 服务控制管理器 (SCM) 负责管理系统上运行的服务的活动...
Radmin VPN Wind... Radmin VPN 是一款免费且用户友好的软件,旨在牢固地连接计算机以创建一个有凝聚力的虚拟专用网...
Hive OS LOLMine... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
如何修复 Steam 内容文件... Steam 内容文件锁定是当您的 Steam 文件无法自行更新时出现的错误。解决此问题的最有效方法之...
Hive OS 部署 PXE ... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
如何在Instagram上扫描... 如何在Instagram上扫描名称标签/ QR? 总而言之,您可以通过大约四种不同的方法来扫描这些I...
在 Windows 11 中打... 什么是链路状态电源管理? 您可以在系统控制面板的电源选项中看到链接状态电源管理。它是 PCI Exp...
Hive OS 新建飞行表的方... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
farols1.1.501.0... faro ls 1.1.501.0(64bit)可以卸载,是一款无需连接外部PC机或笔记本计算机即可...