How To Fix Error PyPI’s XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future

Recently when I run the command pip search pygame in a terminal, it show me the error message like RuntimeError: PyPI’s XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. This article will tell you how to fix it.

1. How To Reproduce The Error.

  1. Open a terminal and run the command pip search pygame in it, then the error will happen.
  2. Below are the detailed error messages.
    $ pip search pygame
    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.

2. Why This Error Happen?

  1. The reason for this error is that the pip search command has been deprecated and banded. Because the PyPI XMLRPC API has received so many search calls ( hundreds of thousands ) per hour since Nov 14, 2020.
  2. You can go to the remove the pip search command page to see the detailed explanation.
  3. But fortunately, there are some alternatives we can use to implement the pip search function.

3. Alternative Methods To Search PyPI Repository.

3.1 Search Python Packages In The PyPI Official Website.

  1. Go to the https://pypi.org/ official website.
  2. Input the python module name in the Search projects input text box.
  3. Click the Search button to search, then you can see the search result list.

3.2 Use PyPi Simple Search.

  1. PyPi simple search is a tool that is developed by Jeffrey M Moore, it provides the pip search function.
  2. Below are the steps of how to use it.
  3. Go to the PyPi simple search GitHub website.
  4. Click the bin folder link to go to the executable file page.
  5. There are 2 script files on the page, pip-pss, and pypi-simple-search.
  6. The script file pip-pss wraps the pypi-simple-search function.
  7. The script file pypi-simple-search contains the bash code that can search the PyPi repository.
  8. You can copy the pypi-simple-search script file content, paste it to your local file pypi-simple-search and save it.
  9. Then open a terminal and run the command chmod +x pypi-simple-search to add executable permission to the script file.
    $ chmod +x pypi-simple-search 
    $ ls -al
    total 8
    drwxr-xr-x   3 songzhao  staff    96 Jan 16 15:23 .
    drwxr-xr-x  11 songzhao  staff   352 Jan 16 15:22 ..
    -rwxr-xr-x   1 songzhao  staff  3989 Jan 16 15:23 pypi-simple-search
  10. Now you can run the file $ . ./pypi-simple-search pygame as below.
    $ . ./pypi-simple-search pygame
    Updating cache of PyPi packages
    blinka-displayio-pygamedisplay
    ......
    vext.pygame
  11. If you use Windows, you can use Cygwin to run the above script. You can read the article How To Install Cygwin On Windows Correctly to learn more.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.