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

1.2 KiB

本文作者:丁辉

安装Pip

Pip安装脚本

脚本安装

  1. 下载脚本

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    
  2. 执行文件

    python get-pip.py
    

命令升级

  • 使用 Python 升级

    python3 -m pip install --upgrade pip
    
  • 使用 Pip 升级

    pip install --upgrade pip
    

安装 Pip3

  • Centos安装

    yum install python3-pip -y
    
  • Ubuntu安装

    apt install python3-pip -y
    

安装 Pip2

  • Centos安装

    yum install python2-pip -y
    
  • Ubuntu安装

    1. 启用 universe 源仓库

      add-apt-repository universe
      
    2. 安装 Python2

      apt install python2 -y
      
    3. 下载安装脚本

      curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
      
    4. 启用脚本

      python2 get-pip.py
      
    5. 验证

      pip2 --version
      

安装 Pip

  • Centos安装

    yum -y install epel-release
    
    yum install python-pip
    
  • Ubuntu安装

    俺不知道嘿嘿嘿