繁体   English   中英

为什么公共存储库没有为 pip 安装添加工作?

[英]Why doesn't the public repository added work for the pip install?

我想安装一个库,但它说它也不可用:

> pip install tensorflow-text==2.4.1
Looking in indexes: https://pypi.douban.com/simple/
ERROR: Could not find a version that satisfies the requirement tensorflow-text==2.4.1 (from versions: 2.5.0)
ERROR: No matching distribution found for tensorflow-text==2.4.1

但是,tensorflow-text==2.4.1 显然存在于存储库中,如下所示:

https://pypi.org/project/tensorflow-text/2.4.1/

我认为原因是本地索引库: https : //pypi.douban.com/simple/

它不使用公共 python 索引存储库。 我记得有一种方法可以更改 py 索引存储库以使用公共索引。 但是我忘记了如何进行更改。 如何编辑使其不会查找本地索引库: https : //pypi.douban.com/simple/

编辑:基于链接的答案,我在配置中添加了一行:

cat ~/.pip/pip.conf 
[global]
index-url=https://pypi.org/simple
extra-index-url = https://pypi.douban.com/simple/

[install]
trusted-host=pypi.douban.com

但我仍然遇到同样的问题:

pip install tensorflow-text==2.4.1
Looking in indexes: https://pypi.org/simple, https://pypi.douban.com/simple/
ERROR: Could not find a version that satisfies the requirement tensorflow-text==2.4.1 (from versions: 2.5.0)
ERROR: No matching distribution found for tensorflow-text==2.4.1

它现在在两个存储库中查找它,但仍然找不到它。 这是为什么?

试试这个: pip install tensorflow-text新版本已于 5 月 21 日发布

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM