解决pip安装出现Could not find a version that satisfies the requirement XXX (from versions: none) 问题

一、背景        

        最近,在新的机器pip安装jieba包的时候,出现了下面的错误:"ERROR: Could not find a version that satisfies the requirement jieba (from versions: none) ERROR: No matching distribution found for jieba"。

二、解决过程

针对出现"ERROR: Could not find a version that satisfies the requirement XXX (from versions: none) ERROR: No matching distribution found for XXX 的问题,有以下常见的解法:

方法1:关闭VPN

        关闭自己的翻墙的VPN,重试。很多人其实是因为用了VPN导致了网络不稳,关闭VPN后重试很可能就解决了。(本次首先关闭VPN重试,但依然没有解决)

方法2:更新自己的pip

        在python的terminal下输入:pip install --upgrade pip。更新pip后重试。不过这个方法成功率一般比较低。(本次更新了自己的pip,重试了依然没有解决。)

方法3:选择使用国内的镜像源

        这个方法成功率很高,一般能够解决常出现的问题。(使用该方案成功解决)

        pip install 包的名称 -i 镜像的url --trusted-host 镜像的host

        示例: pip install jieba -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

三、国内常用镜像源

        本人列举了相关的国内常用的镜像源,以及对应的优缺点,供大家自行选择使用。

镜像源名称

URL

备注

清华大学镜像源

https://pypi.tuna.tsinghua.edu.cn/simple/

完全度和速度都很好,是一个优秀的pip镜像源

阿里云镜像源

https://mirrors.aliyun.com/pypi/simple/

完全度和速度也很好,是一个不错的选择

网易镜像源

https://mirrors.163.com/pypi/simple/

速度比较快,但是完全度有限

豆瓣镜像源

https://pypi.douban.com/simple/

速度较快,但是完全度也有限

百度云镜像源

https://mirror.baidu.com/pypi/simple/

速度较快,但是完全度也有限

中科大镜像源

https://pypi.mirrors.ustc.edu.cn/simple/

速度较快,但完全度不如前面几个镜像源

华为云镜像源

https://mirrors.huaweicloud.com/repository/pypi/simple/

完全度和速度均中等

腾讯云镜像源

https://mirrors.cloud.tencent.com/pypi/simple/

速度一般,完全度也一般

参考资料

1. https://zhuanlan.zhihu.com/p/623325525?utm_id=0

2. https://blog.csdn.net/csdn_am/article/details/79924744

  • 34
    点赞
  • 90
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
根据引用中的描述,当出现 "Could not find a version that satisfies the requirement xxx" 错误时,意味着找不到满足要求的版本。这通常是由于以下原因之一导致的: 1. 指定的包名称错误或拼写错误。请确保输入的包名称正确无误。 2. 指定的包版本不存在。有时候,你可能指定了一个不存在或不兼容的版本。你可以尝试使用其他可用的版本。 3. 网络连接问题。这可能是由于你的网络连接不稳定或无法连接到软件源。你可以尝试切换到其他镜像源,或者检查你的网络连接。 对于你提到的错误信息 "Could not find a version that satisfies the requirement wx (from versions: none)",它意味着找不到满足要求的 wx 包的版本。这可能是由于以下原因之一导致的: 1. 你输入的包名称错误或拼写错误。请检查你输入的包名称是否正确。 2. wx 包可能没有可用的版本。在某些情况下,某些包可能没有适用于你的平台或Python版本的版本。你可以尝试查找其他替代的包或解决方案。 3. 网络连接问题。请确保你的网络连接正常,并且能够访问软件源。 总结来说,"Could not find a version that satisfies the requirement wx (from versions: none)" 错误意味着找不到满足要求的 wx 包的版本。你可以检查包名称的拼写是否正确,尝试查找其他替代的包或解决方案,以及确保你的网络连接正常。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [pip/pip3 install 报错 “Could not find a version that satisfies the requriement xxx” 的解决方法](https://blog.csdn.net/wxt_hillwill/article/details/114657259)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Could not find a version that satisfies the requirement PIL (from versions: ) No matching distribu](https://download.csdn.net/download/weixin_38722721/13750519)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Python出现Could not find a version that satisfies the requirement openpyxl (from versions: )](https://blog.csdn.net/weixin_50464560/article/details/115432559)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值