【pip安装第三方库】Could not find a version that satisfies the requirement xxxx (from versions: none)

【问题描述】

用 pip install easydict 命令安装easydict包时候,报了如下的错:

twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
grin 1.2.1 requires argparse>=1.1, which is not installed.

在这里插入图片描述
以为是没有安装PyHamcreast包的原因,然后就打算先安装这个。
结果报错:

Could not find a version that satisfies the requirement PyHamcreast (from versions: )
No matching distribution found for PyHamcreast

在这里插入图片描述

【解决方案】

可以通过如下命令解决:

pip --trusted-host pypi.python.org install 安装包名字

如果还是报同样的错误无效,那就使用另一个镜像网站:

http://pypi.doubanio.com/simple/

大家可以打开看一下该网站,几乎包含所有的常见包。大家可以按照字母顺序找一下里面是否包含自己即将要安装的包,一般来说是有的。

对应的命令行就是:

pip install 安装包名字  -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com

问题解决。


参考链接汇总

[1] Could not find a version that satisfies the requirement tensorflow问题汇总+解决!!!
[2] Could not find a version that satisfies the requirement pymysql3 (from versions: ) No matching dist

  • 9
    点赞
  • 35
    收藏
    觉得还不错? 一键收藏
  • 13
    评论
当在使用pip安装pymysql包时出现"ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)"的错误,这通常意味着pip无法找到与您指定的版本要求相匹配的pymysql包。此错误可能有几个解决办法。 首先,您可以尝试使用不同的镜像源进行安装。引用中提到,使用豆瓣镜像源可以解决此问题。您可以运行以下命令尝试使用豆瓣镜像源安装pymysql包: pip install pymysql -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 另外,引用中提到,考虑到网络速度的原因,采用国内的镜像源也可以加速安装。您可以尝试运行以下命令来安装pymysql包: pip install pymysql -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 这些命令会将镜像源设置为豆瓣镜像源,并使用该镜像源来安装pymysql包。 如果以上方法仍然无法解决问题,您可以尝试更新pip工具到最新版本,然后再次尝试安装pymysql包。 综上所述,解决"ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)"错误的方法包括使用不同的镜像源进行安装,更新pip工具到最新版本等。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)](https://blog.csdn.net/ximaiyao1984/article/details/122191713)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [pip下载包报错ERROR: Could not find a version that satisfies the requirement xxxx==1.0.2 (from ...](https://blog.csdn.net/qq_51081319/article/details/129476127)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值