[英]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.