hi it is about two days I am getting this error:
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.
I asked from some people and searched a lot but I din't kbow what is the problem and how to fix it I tryed apt update
and python3 pip install --upgrade pip
recommended by pip itself I am in android using Termux pip was working for some days ago...
The upshot is that searching for Python packages with pip, eg: pip search ascii or pip3 search png , isn't possible because this backend search API is unavailable. In March, the API was permanently disabled, depriving developers of one of several ways to programmatically find packages in PyPI.
One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.
You must give at least one requirement to install (see "pip help install") You are using pip version 9.0. 1, however version 9.0. 3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
pip search command is used to search the index and identify packages that match the search terms. For example, python3 -m pip search pandas will return all the packages that satisfy the search term pandas .
Sadly pip search
is now permanently banned by python.org.
They said that they are experiencing "hundreds of thousands of search calls per hour" for 100 days(since Nov 14, 2020), and the XMLRPC API, via which the search calls are taking, had already been determined to be deprecated before this happened.
So maybe we need to search for packages directly on pypi.org, or turn to packages like pypi-simple-search or pipsearch.
For search base on package name pattern, I share this script below, hope you find it useful.
#!/bin/bash # pypi-search.sh # This script fetch data from https://pypi.org/simple/ # process the output for simple package name output with perl # and then apply a regex pattern to the result pypiurl=https://pypi.org/simple/ currentdate=$(date +%y%m%d) cachedir=~/.cache/simple-pypi [[ -d $cachedir ]] || mkdir -p $cachedir cachefile=$(ls -1 $cachedir/*_simple-pypi.html 2>/dev/null | sort | head -n1) [[ $cachefile = "" ]] && cachefile=$cachedir/"${currentdate}_simple-pypi.html" searchpattern="$1" cmd="$2" if [[ -f $cachefile ]] ; then dbdate=$(echo $cachefile | grep -Po "[0-9]{6,6}") # if db is older than 3 days or second parameter is 'update' ( (( ($currentdate - $dbdate) > 3 )) || [[ "x$cmd" = 'xupdate' ]] ) && { echo "last update was on : $dbdate" cachefile=$cachedir/"${currentdate}_simple-pypi.html" wget -q --show-progress -O - $pypiurl > $cachefile } else wget -q --show-progress -O - $pypiurl > $cachefile fi [[ x$searchpattern = "x" ]] && read -p "Enter pypi name pattern : " searchpattern perl -pe 's/.*([\/"]{1,1}\>){1,1}([^>]+(.*)[^<])+\<\/a\>/\2/g' $cachefile | grep -P "$searchpattern"
Usage: pypi-search.sh ^pip$
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