pip search - pip documentation v24.3.dev0 (2024)

View this page

Toggle table of contents sidebar

Problem

By default, pip search searches packages on PyPI.org from the command line. However, the team are considering removing it, because they think it’s not that useful and using too many resources on PyPI (PyPI XMLRPC search has been disabled because of abuse/overuse).

Skip to recommendations

Research

Prior to PyPI XMLRPC search being disabled, we:

  • Gathered feedback on pip search via the “buy a feature” survey

  • Published a survey specifically about pip search, asking users about:

    • Their current use of pip search

    • How useful they find pip search results

    • How clear they find pip search results

    • Where users expect pip to search (e.g. PyPI vs private index)

    • What data pip should search other than project name

    • What changes or additions they would make to pip search

Results

In total, we received 1070 responses to the buy a feature survey, with 541 (50.4%) respondents selecting “Search pypi.org for packages” in their top 10 features.

However, search ranked lower than the following features:

  1. Run pip without requiring any user input (e.g. in CI) 718

  2. Show information about all installed packages 707

  3. Show information about a single installed package 596

We received 302 responses to the pip search survey, with 62 of the 302 (20.5%) respondents either not knowing that the command existed, never using it, or using it “rarely”.

We found that the remaining ~80% of respondents who do use pip search use it to:

  • Find/search for the right/new/alternate packages to install:

    • Checking package name (verify correct spelling)

    • Assessing functionality (check a package’s description)

    • Verifying availability (check if such package exists)

  • Search for the latest version of a package (verify version)

  • Find package libraries and new modules

In general, pip search is regarded as:

  • more useful than not useful

  • more clear than not clear

When asked if pip should search on items other than the package name, respondents most commonly asked to search the package description:

pip search - pip documentation v24.3.dev0 (1)

Some users also mentioned that they would like the search to be configurable, e.g. by passing flags/options.

When asked how they would improve pip search, users said they would improve:

1. Search methods:

  • fuzzy search and insensitive case should be acceptable

  • users should have the option to filter/sort by description, name, tag

2. Search results:

  • relevancy: the results should show both the exact match and closest match

  • order/category: the result should display items in a certain order, e.g highest number of downloads (popularity), development status (last updated/latest version), etc.

  • there should be a limited number of search results

3. User interface:

  • link package to pypi page

  • use color coding / system for better clarity

  • distinguish exact match search results from others: by highlighting, or using a different color

  • indicate version compatibility

Recommendations

Deprecation strategy

Given that the PyPI search API is currently disabled (as of 1st Jan, 2021) for technical and sustainability reasons, we recommend that the pip team display a clear error message to users who use the command:

The PyPI search API has been disabled due to unmanageable load.To search PyPI, open your browser to search for packages at https://pypi.orgAlternatively, you can search a different index using the --index command.

In the longer term, we recommend that the PyPI team investigate alternative methods of serving search results (e.g. via caching) that would enable pip search to work again. This recommendation is supported by our research which suggests that many pip users find this functionality useful.

If this is not possible, the pip team should create clear instructions that tells users what to use instead. Some suggestions (based on common user flows) are listed below:

Finding a new package based on tags and keywords

This is the most common feature that you would expect from pip search and likely the hardest to replace after deprecation.

As mentioned above, the pip CLI should - as soon as possible - hide the full-trace error message present when a user types pip search. Instead, pip should show a message that encourages users to use the search index on the website itself (in their browser) by providing a link directly to https://pypi.org. Also, pip should provide a short hint on how to use an alternative index.

$ pip search pytestThe PyPI search API has been disabled due to unmanageable load.Please open your browser to search for packages at https://pypi.orgAlternatively, you can use a different index using the --index command. pip search pytest --index <URL>

In addition, the pip team could implement an alternative to the PyPI search API that works without a hard dependency on a centralized service. Similar to other distribution systems like apt and yum, the metadata of all package names could be downloaded on the user’s machine with an opt-in workflow:

$ pip search pytestUsing pip search on the command line requires you to download the index first.Alternatively, you can open your browser to search for packages at https://pypi.orgDownload the index to /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/search.db? (y/n) y......... done!<results>$ pip search pytest<results>

This is a more complex route that will require more engineering time, but can aim to provide command line users with a similar functionality to the old pip search command. It can also check the age of the local index and show a warning if it is getting old.

Verifying the latest version of a package

Users also use the pip search command to find or verify a particular package’s version.

As a replacement, the pip team could do either of the following:

  1. Extend the pip show feature to include known latest versions of the package;

  2. Create a pip outdated command which scans the current dependency tree and outputs the packages that are outdated (compared to the latest versions on the configured index).

UX improvements

Should it be possible to continue to support pip search, we strongly recommend the following UX improvements:

  • Adding support for fuzzy search, or suggesting alternative/related search terms

  • Adding support for case insensitive search

  • Searching based on a package’s description

  • Linking search results to a package’s PyPI page (where appropriate)

Other user feedback (as detailed above) should also be considered by the team on a case-by-case basis.

pip search - pip documentation v24.3.dev0 (2024)
Top Articles
Using Quantitative Investment Strategies
Mon banquier peut-il me demander des justificatifs pour faire un virement bancaire ? - La finance pour tous
Craigslist San Francisco Bay
Online Reading Resources for Students & Teachers | Raz-Kids
The 10 Best Restaurants In Freiburg Germany
50 Meowbahh Fun Facts: Net Worth, Age, Birthday, Face Reveal, YouTube Earnings, Girlfriend, Doxxed, Discord, Fanart, TikTok, Instagram, Etc
DL1678 (DAL1678) Delta Historial y rastreo de vuelos - FlightAware
سریال رویای شیرین جوانی قسمت 338
Student Rating Of Teaching Umn
Shariraye Update
Hssn Broadcasts
Betonnen afdekplaten (schoorsteenplaten) ter voorkoming van lekkage schoorsteen. - HeBlad
How do you like playing as an antagonist? - Goonstation Forums
Best Suv In 2010
Suffix With Pent Crossword Clue
Diamond Piers Menards
Weather Rotterdam - Detailed bulletin - Free 15-day Marine forecasts - METEO CONSULT MARINE
Whitefish Bay Calendar
Gia_Divine
Metro Pcs.near Me
Airrack hiring Associate Producer in Los Angeles, CA | LinkedIn
Popular Chinese Restaurant in Rome Closing After 37 Years
Maxpreps Field Hockey
Canvasdiscount Black Friday Deals
Seeking Arrangements Boston
Www Va Lottery Com Result
Craigslistodessa
MyCase Pricing | Start Your 10-Day Free Trial Today
Dark Entreaty Ffxiv
Criterion Dryer Review
Divide Fusion Stretch Hoodie Daunenjacke für Herren | oliv
Neteller Kasiinod
Insidious 5 Showtimes Near Cinemark Southland Center And Xd
Free Tiktok Likes Compara Smm
100 Million Naira In Dollars
Citibank Branch Locations In Orlando Florida
Netherforged Lavaproof Boots
Lichen - 1.17.0 - Gemsbok! Antler Windchimes! Shoji Screens!
Pickle Juiced 1234
拿到绿卡后一亩三分地
KITCHENAID Tilt-Head Stand Mixer Set 4.8L (Blue) + Balmuda The Pot (White) 5KSM175PSEIC | 31.33% Off | Central Online
The Complete Guide To The Infamous "imskirby Incident"
Vivek Flowers Chantilly
Latest Nigerian Music (Next 2020)
Housing Intranet Unt
Htb Forums
Amc.santa Anita
18006548818
O'reilly's On Marbach
2000 Fortnite Symbols
Where Is Darla-Jean Stanton Now
Hcs Smartfind
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 6052

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.