Files
Linux/Docs/安装各版本Pip.md
offends cee91802b3
Some checks failed
continuous-integration/drone Build is failing
synchronization
2025-08-25 15:57:40 +08:00

104 lines
1.2 KiB
Markdown

> 本文作者:丁辉
# 安装Pip
[Pip安装脚本](https://bootstrap.pypa.io/pip/)
## 脚本安装
1. 下载脚本
```bash
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
```
2. 执行文件
```bash
python get-pip.py
```
## 命令升级
- 使用 Python 升级
```bash
python3 -m pip install --upgrade pip
```
- 使用 Pip 升级
```bash
pip install --upgrade pip
```
## 安装 Pip3
- Centos安装
```bash
yum install python3-pip -y
```
- Ubuntu安装
```bash
apt install python3-pip -y
```
## 安装 Pip2
- Centos安装
```bash
yum install python2-pip -y
```
- Ubuntu安装
1. 启用 universe 源仓库
```bash
add-apt-repository universe
```
2. 安装 Python2
```bash
apt install python2 -y
```
3. 下载安装脚本
```bash
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
```
4. 启用脚本
```bash
python2 get-pip.py
```
5. 验证
```bash
pip2 --version
```
## 安装 Pip
- Centos安装
```bash
yum -y install epel-release
```
```bash
yum install python-pip
```
- Ubuntu安装
俺不知道嘿嘿嘿