gpt4 book ai didi

python - 如何验证 pip 的 --extra-index-url?

转载 作者:太空宇宙 更新时间:2023-11-03 20:36:05 43 4
gpt4 key购买 nike

我无法找到应该从我在全局 pip.ini< 中使用 --extra-index-url 定义的本地包索引中找到的某些包 文件。

如何验证我的 pip 是否正确使用此功能?在我的场景中,我使用的是虚拟环境。

我尝试过pip config list,因为它在pip help中听起来很有希望,但我没有得到任何输出。

最佳答案

尝试安装不存在的模块:

pip install --extra-index-url=https://example.com made-up

就我而言(除了很多错误之外)我还得到:

Looking in indexes: https://pypi.org/simple, https://example.com
Collecting made-up
Could not find a version that satisfies the requirement made-up (from versions: )
No matching distribution found for made-up

如果设置正确,您应该会在输出中看到额外的存储库 URL。如果您使用默认值运行,则不会显示“Looking inindexes”行。

关于python - 如何验证 pip 的 --extra-index-url?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57163856/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com