I would like to be able to search for an available Python package using pip
(on the terminal). I would like a functionality similar to apt-cache
in Ubuntu. More specifically, I would like to
apt-cache search [package-name]
), andpip search Looking for a package, pip is there to help you out. pip search allows you to search PyPI for any package using the pip search <package> command. The result of the command returns the name and description of all the matching packages.
The Pip, Pipenv, Anaconda Navigator, and Conda Package Managers can all be used to list installed Python packages. You can also use the ActiveState Platform's command line interface (CLI), the State Tool to list all installed packages using a simple “state packages” command.
There are three ways to get the list of all the libraries or packages or modules installed in python using pip list command, pip freeze command and help function . This will list all the modules installed in the system .
pip looks for packages in a number of places: on PyPI (if not disabled via --no-index ), in the local filesystem, and in any additional repositories specified via --find-links or --index-url .
As of Dec 2020, pip search
will not work (more).
The current feasible solution is to search online, on: https://pypi.org/ (reference also provided by previous comments).
If anyone hitting the following error:
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.">
as stated in #5216:
As an update: XMLRPC search does still remain disabled.
because:
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.
Update: As a CLI alternative to pip
, that uses PyPI registry, one can use poetry:
$ poetry search <package>
To search for a package, issue the command
pip search [package-name]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With