gpt4 book ai didi

python - 如何使用 pip 搜索可用的 Python 包?

转载 作者:IT老高 更新时间:2023-10-28 20:24:10 25 4
gpt4 key购买 nike

我希望能够使用 pip(在终端上)搜索可用的 Python 包。我想要一个类似于 Ubuntu 中的 apt-cache 的功能。更具体地说,我想

  1. 能够搜索给定术语的包(类似于 apt-cache search [package-name]),并且
  2. 列出所有可用的软件包。

最佳答案

自 2020 年 12 月起,pip search 将无法使用 (more)。

目前可行的解决方案是在线搜索,在:https://pypi.org/ (以前的评论也提供了引用)。

如果有人遇到以下错误:

xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI's XMLRPC API has been temporarily
disabled due to unmanageable load and will be deprecated in the near future.
See https://status.python.org/ for more information.">

#5216 中所述:

As an update: XMLRPC search does still remain disabled.

因为:

As noted in #5216 (comment), a group of servers are hitting the pip search entry point, to an extent that PyPI cannot sustain that load with the current architecture of how pip search works.

更新: 作为 pip 的 CLI 替代方案,它使用 PyPI 注册表,可以使用 :

$ poetry search <package>

关于python - 如何使用 pip 搜索可用的 Python 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17373473/

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