首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何使用pip搜索可用的Python包?

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

Stack Overflow用户
提问于 2013-06-29 04:51:41
回答 6查看 128.8K关注 0票数 100

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

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

回答 6

Stack Overflow用户

回答已采纳

发布于 2013-06-29 05:00:16

要搜索软件包,请发出以下命令

代码语言:javascript
运行
复制
pip search [package-name]
票数 90
EN

Stack Overflow用户

发布于 2021-04-15 23:11:24

截至2020年12月14日,the pip search functionality has been disabled

代码语言:javascript
运行
复制
$ pip search cast
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.

这是我刚刚找到的一个名为pip_search的小工具,它可以执行简单的搜索,但它可以完成以下工作:

这是pip_search v0.0.6的输出:

代码语言:javascript
运行
复制
$ pip_search pulsemixer
----------------  -------------------------------------------------------------------------------
Name              Description

pulsemixer        pulsemixer - CLI and curses mixer for PulseAudio
pulsectl-asyncio  Asyncio frontend for the pulsectl Python bindings of libpulse
pulsectl          Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)
----------------  -------------------------------------------------------------------------------

更新:pip_search已经更新,每个文件夹都是每个项目的可点击(CTRL+click)地址,现在看起来是这样的:

代码语言:javascript
运行
复制
$ pip_search pulsemixer
                                            https://pypi.org/search/?q=pulsemixer                                             
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Package             ┃ Version ┃ Released     ┃ Description                                                                     ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│  pulsemixer       │ 1.5.1   │ Apr 11, 2020 │ pulsemixer - CLI and curses mixer for PulseAudio                                │
│  pulsectl-asyncio │ 0.1.7   │ Jun 13, 2021 │ Asyncio frontend for the pulsectl Python bindings of libpulse                   │
│  pulsectl         │ 21.5.18 │ May 22, 2021 │ Python high-level interface and ctypes-based bindings for PulseAudio (libpulse) │
└─────────────────────┴─────────┴──────────────┴─────────────────────────────────────────────────────────────────────────────────┘

要安装它,只需输入:pip install pip_search

还有另一个我刚刚尝试过的工具,叫做pypisearch

要安装它,只需输入:pip install pypisearch

它是这样工作的:

代码语言:javascript
运行
复制
$ python -m pypisearch pulsemixer
pulsemixer (1.5.1)        [installed 1.5.0] pulsemixer - CLI and curses mixer for PulseAudio
pulsectl-asyncio (0.1.5)  Asyncio frontend for the pulsectl Python bindings of libpulse
pulsectl (21.3.4)         Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)
票数 24
EN

Stack Overflow用户

发布于 2013-06-29 05:16:01

使用pip search QUERY进行搜索的

使用pip helppip help COMMAND了解所有可用命令及其选项。

  1. 您可以在此处找到完整的软件包列表:

https://pypi.org/

可以在这里找到一个标记更简单的索引,以便更容易地自动消费:

https://pypi.org/simple/

票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17373473

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档