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

无法安装Python库求助:pip9.0.1+Python2.7安装presto-python-client失败

解决Python 2.7 + pip 9.0.1安装presto-python-client失败的问题

首先得明确问题根源:

  • 你的pip版本9.0.1实在太老旧,它不支持当前PyPI的包发布格式和索引规则,导致无法检索到目标包
  • Python 2.7早在2020年就彻底停止维护了,绝大多数现代Python库(包括presto-python-client)都不再提供适配Python 2.7的版本

给你几个可行的解决方案:

1. 先升级pip到Python2.7支持的最高版本

虽然Python2.7已停更,但pip还有最后一个适配它的版本(20.3.4),先执行升级:

pip install --upgrade pip==20.3.4

升级完成后再尝试安装:

pip install presto-python-client

2. 指定安装兼容Python2.7的旧版本包

如果升级pip后仍然找不到包,说明presto-python-client已不再提供Python2.7适配包,这时可以安装它最后一个支持Python2.7的版本(经查为0.7.0):

pip install presto-python-client==0.7.0

3. 长远建议:迁移到Python3

Python2.7已被彻底淘汰,后续会有更多库无法在该环境安装使用。建议尽快迁移到Python3.8及以上版本,再用新版pip安装:

pip3 install presto-python-client

你遇到的错误信息如下:

EN-NishantS:~ 8417$ pip install presto-python-client
Collecting presto-python-client
Could not find a version that satisfies the requirement presto-python-client (from versions: )
No matching distribution found for presto-python-client

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.22 09:16:06