pip search 无法正常工作,报错如下
完整报错:
$ pip search absl-py --proxy http://10.xxx.xxx.xxx:8080 --trusted-host=pypi.python.org
/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/connectionpool.py:860: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
Exception:
Traceback (most recent call last):File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in mainstatus = self.run(options, args)File "/usr/lib/python2.7/dist-packages/pip/commands/search.py", line 45, in runpypi_hits = self.search(query, options)File "/usr/lib/python2.7/dist-packages/pip/commands/search.py", line 62, in searchhits = pypi.search({
'name': query, 'summary': query}, 'or')File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__return self.__send(self.__name, args)File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __requestverbose=self.__verboseFile "/usr/lib/python2.7/dist-packages/pip/download.py", line 778, in requestreturn self.parse_response(response.raw)File "/usr/lib/python2.7/xmlrpclib.py", line 1493, in parse_responsereturn u.close()File "/usr/lib/python2.7/xmlrpclib.py", line 800, in closeraise Fault(**self._stack[0])
Fault: <Fault -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.">
因为官网暂时关掉了这个功能,详见:https://status.python.org/
参考:https://blog.csdn.net/qq_30082991/article/details/111565140