如何在 Windows 上使用 python 2.6 安装 pip

2023-12-05

我尝试在我的开发计算机上安装带有 python 2.6 的 pip,以尝试匹配也使用 python 2.6 的部署环境。

Python 2.6 安装正常。我尝试使用 get-pip.py 安装 pip,如此处所述https://pip.pypa.io/en/stable/installing/与 get-pip.py 脚本的版本https://bootstrap.pypa.io/2.6/get-pip.py

但是它失败并出现以下情况:

C:\users\me> python get-pip.py
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting pip<10
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. 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
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:137: 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
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:137: 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
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:137: 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
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:137: 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
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:137: 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
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/
c:\users\me\appdata\local\temp\tmpcdimtd\pip.zip\pip\_vendor\urllib3\util\ssl_.py:137: 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
  Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping
  Could not find a version that satisfies the requirement pip<10 (from versions: )
No matching distribution found for pip<10

显然,升级到更新的 python 违背了我的目的。

信息位于URL建议用于警告InsecurePlatformWarning建议我使用 pip 安装更多东西... >.

PS我也尝试过使用 setuptools-40.0.0 中的简易安装,但我无法让它工作。我不确定我是否正确使用它,因为 setuptools 安装文档有循环链接(从文档到 Pypi,回到文档)


对于 Python 2.6,你需要较旧的版本setuptools。与 Python 2.6 一起使用的最后一个 setuptools 版本是36.8.

下载安装工具-36.8.0.zip,解压并运行python2.6 setup.py install.

在那之后获取 pip.py应该安装pip为你。

最后一个版本pip支持Python 2.6的是9.0.3: https://pypi.org/project/pip/9.0.3/#files

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 Windows 上使用 python 2.6 安装 pip 的相关文章

随机推荐

  • Android - 获取自定义对话框中组件的句柄

    我正在尝试通过单击菜单中的选项来创建自定义对话框 我继续启动一个新活动 其 Intent 指向 customTextMessageDialog I 我能拿到手柄使用 phoneNumber EditText dialog findViewB
  • 如何在 Exoplayer 中添加下一个、上一个、快退和前进的侦听器

    我正在 ExoPlayer 上工作 我想自定义 ExoPlayer 并监听事件下一个 上一个 倒带 前进 以便当用户单击下一个按钮时播放列表中的下一个视频将播放 而使用上一个时将播放播放列表中的上一个视频将播放播放列表等 我正在使用自定义布
  • 有没有办法回答(或忽略)所有 y/n 提示的“y”?

    我有一个 Jupyter 笔记本 里面有很多大变量 有一次我想扔掉所有我已经用完的变量 我使用 reset selective 变量名来清除每个变量 但这些变量有 60 个 当我运行包含所有 60 个提示的块时 它会要求我为每个清除输入 y
  • 使用c#在Word中按名称访问表

    我有一个包含很多表格的文档 我想使用 C 和 Microsoft Office Interop Word 修改这些表 我读到我可以使用 Tables 接口迭代所有表 问题 是否可以为表指定名称 ID 并通过名称访问表 就像 Powerpoi
  • 通过 github API 关闭拉取请求

    根据我们应用程序的设计要求 我们曾经使用 gitlab API 删除 Gitlab 中的合并请求 现在我们正在迁移到 Github 我正在寻找类似的 API 调用来关闭 Github 上的拉取请求 我通读了文档here 但它没有回答我的问题
  • 对数据框的每一行进行排序[重复]

    这个问题在这里已经有答案了 我正在尝试使用这一行对数据框的每一行进行排序 sapply df function x sort x 但是 对列进行排序而不是对行进行排序 例如 这个数据框 5 10 7 1 5 6 3 9 2 4 4 5 1
  • *a, b, c = line.split() 中的星号有什么作用?

    Assume line is Chicago Sun 01 52 什么是 a b c line split 做 特别是 星号的意义是什么 编辑 经过测试 似乎 Chicago Sun and 01 52 都存储在a b and c 星号似乎
  • 一级缓存可以与 ICriteria 或其他 API 一起使用吗?

    In NHibernate使用时您可以轻松地从一级缓存中受益Load or Get方法 但是关于ICriteria HQL Linq to NHibernate and QueryOver 他们也使用一级缓存吗 他们使用它来返回实体 但查询
  • PowerMockito.doReturn 返回 null

    这是我正在测试的课程 public class A public Integer callMethod return someMethod private Integer someMethod Some Code HttpPost http
  • 在Linux上,如何确保解锁被锁定在死亡/终止的线程中的互斥体?

    这是一道面试题 在 Linux 上 如何确保解锁被锁定在死亡 终止的 POSIX 线程中的 POSIX 互斥锁 我的想法 Linux向程序发送kill或终止信号时会自动释放它吗 但是 我找不到有关操作系统如何执行此操作的更多详细信息 tha
  • Facebook.php 和 facebookapi_php5 文档

    我在哪里可以找到关于这两个 PHP 文件的良好文档以及每个函数的更详细和深入的使用 Facebook 文档 信息不够丰富 哈哈 我感受到你的痛苦 facebookapi php5主要是各个API方法 facebook 主要用于会话 身份验证
  • 如何动态添加新方法到 php 对象?

    如何 即时 向对象添加新方法 me new stdClass me gt doSomething function echo I ve done something me gt doSomething Fatal error Call to
  • Cordova 文件插件在 Android 中从未准备就绪

    我有一个非常简单的 Cordova 应用程序 只有一个插件 org apache cordova file 当我在 Android 模拟器中模拟该应用程序时 deviceready事件永远不会被触发 我得到以下输出 D CordovaLog
  • Zend Framework 2 - 注释表单不起作用

    谢谢 光新藤我调查了AnnotationForms这似乎是最好的解决方法ModelForms 但示例所示here对我不起作用 use Zend Form Annotation AnnotationBuilder builder new An
  • 构建项目时出现转换异常[重复]

    这个问题在这里已经有答案了 当我尝试运行我的应用程序时 出现以下错误 Error Execution failed for task app transformClassesWithDexForDebug gt com android bu
  • 绑定和解构块参数

    在 ruby 中 有没有一种方法可以同时将块的参数绑定到局部变量并对其进行解构 谷歌搜索没有找到我任何东西 并且在 IRB 中玩也毫无结果 但我想我回想起了类似于以下功能的功能 gt gt 1 2 3 4 map x y z x y z g
  • 将 DateTime.Add(TimeSpan) 与 LINQ 结合使用

    我必须运行如下查询 它实际上更复杂 但这里是重要的部分 var results from b in context Bookings where b ScheduleDate Add b StartTime gt DateTime UtcN
  • 批次中的随机生成器

    我有一个bat文件 echo RANDOM 并使用命令行执行它 start randomcheck bat start randomcheck bat 打开两个控制台 并且都包含相同的数字 4645 这无法达到随机的目的提供不同的临时文件夹
  • ASP.Net Core 文件上传进度会话

    我正在 ASP Net Core 中编写文件上传 并尝试更新进度栏 但是当从 javascript 调用 进度 操作时 会话值未正确更新 进度使用以下方式保存在用户会话中 public static void StoreInt ISessi
  • 如何在 Windows 上使用 python 2.6 安装 pip

    我尝试在我的开发计算机上安装带有 python 2 6 的 pip 以尝试匹配也使用 python 2 6 的部署环境 Python 2 6 安装正常 我尝试使用 get pip py 安装 pip 如此处所述https pip pypa