gpt4 book ai didi

python - 如何在 Windows 10 上安装适用于 python 2.7.3 的 pip?

转载 作者:行者123 更新时间:2023-12-01 00:09:49 24 4
gpt4 key购买 nike

我正在尝试为 python 2.7.3 安装 pip (不幸的是,我无法选择必须使用的 python 版本),并且在运行 get-pip.py (从官方网站下载:https://pip.pypa.io/en/stable/installing/ )时使用 python 2.7.3 我收到此消息:

InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

最佳答案

如果您使用的是 python 2.7.9 或更高版本,则 pip 已安装。对于较低版本的 python,您可以使用以下步骤安装 pip:

  1. 从这里下载 get-pip.py scripy:https://bootstrap.pypa.io/get-pip.py
  2. 打开命令提示符并导航到 get-pip.py 文件。
  3. 运行命令python get-pip.py

安装后,您可以使用python -m pip --version'检查pip版本。如果你想升级 pip 版本,可以运行 python -m pip install --upgrade pip`

安装 pip 时收到的与 SSL 相关的警告可以通过升级到最新版本的 python 2.7 或按照此处给出的说明来克服:https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings 。如果您在 python 脚本中处理某些 url,这些警告与您相关。

关于python - 如何在 Windows 10 上安装适用于 python 2.7.3 的 pip?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59702017/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com