You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级至pip9.0.3后仍遇TLSv1错误,Linux下无法安装软件包

Fixing TLSv1 Alert Error After Upgrading pip to 9.0.3

Hey there, let's break down why you're hitting this TLSv1 error and how to fix it quickly.

The Root Cause

pip 9.0.3 is a very outdated version—PyPI stopped supporting TLSv1 and TLSv1.1 protocols years ago to enforce secure connections. Since this old pip release only knows how to use those deprecated protocols, it can't establish a valid SSL connection to PyPI anymore, which triggers the TLSV1_ALERT_PROTOCOL_VERSION error you're seeing.

Step-by-Step Solutions

Option 1: Install the Latest pip via get-pip.py (Most Reliable)

This is the surest way to get a modern pip version that supports TLS 1.2+:

  • Grab the official get-pip.py script (you can retrieve it via Python's official resources; if direct downloads fail, transfer the file from a machine with a working pip setup if needed)
  • Run it with your Python interpreter:
    python get-pip.py
    
    Or if you use Python 3 specifically:
    python3 get-pip.py
    
    This will overwrite your old pip with the latest compatible version that works with PyPI's current security standards.

Option 2: Force Upgrade with Trusted Host Flags (Emergency Workaround)

If you can't download get-pip.py right now, try forcing an upgrade using these flags to bypass temporary SSL check hurdles:

pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org

Note: This is a short-term fix—once you have the latest pip installed, you won't need these flags anymore for regular package installs.

After upgrading pip to a recent version (20.0+ at minimum), you'll be able to install packages from PyPI without running into this TLS error again.

内容的提问来源于stack exchange,提问作者redacted code

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:20:20