2

I'm not a python expert but I am just helping a client with some problem they have passed on to me.

I am unsure what this error message is related to but they are using a Mac and trying to use pip search, I believe.

Here is the output with error(s):

mindtc04179:~ jrb$ pip search virtualenv 
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after
connection broken by 'ProtocolError('Connection aborted.', error(54,,'Connection reset by peer'))': /pypi
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(54, 'Connection reset by peer'))': /pypi 
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(54, 'Connection reset by peer'))': /pypi
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(54, 'Connection reset by peer'))': /pypi
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(54, 'Connection reset by peer'))': /pypi

Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/search.py", line 45, in run pypi_hits = self.search(query, options)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/search.py", line 62, in search hits = pypi.search({'name': query, 'summary': query}, 'or')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1243, in __call__return self.__send(self.__name, args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1602, in __request verbose=self.__verbose
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/download.py", line 775, in request headers=headers, stream=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 522, in post return self.request('POST', url, data=data, json=json, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/download.py", line 386, in request return super(PipSession, self).request(method, url, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 475, in request resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 596, in send r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send resp = super(CacheControlAdapter, self).send(request, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 487, in send raise
ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi (Caused by ProtocolError('Connection aborted.', error(54, 'Connection reset by peer')))

What is this error caused by? How can I fix this issue?

Martin Evans
  • 45,791
  • 17
  • 81
  • 97
Tommy
  • 21
  • 1
  • check if [your (or client's) firewall is not blocking pip](https://stackoverflow.com/questions/45701622/pip-not-working-proxy-connection-aborted) – Vanity Slug - codidact.com Oct 03 '17 at 14:34
  • There is definitely something wrong with connection. Comment above [last exception that is being thrown](https://github.com/pypa/pip/blob/master/src/pip/_vendor/requests/adapters.py#L483) is source code says: "If we hit any problems here, clean up the connection. Then, reraise so that we can handle the actual exception." – Vanity Slug - codidact.com Oct 03 '17 at 14:38
  • Can you provide any more info regarding what you are doing, by any chance? – Vanity Slug - codidact.com Oct 03 '17 at 14:43
  • @AlexL , From what I can see is his doing a basic pip search for virtualenv. The funny thing here is , it works perfectly fine on a virtual machine which is Windows based. But on a iMac and Mac book pro on the same network it gives that message. – Tommy Oct 03 '17 at 15:22
  • Possible duplicate of [Proxy awareness with pip](https://stackoverflow.com/questions/30992717/proxy-awareness-with-pip) – craq Jun 18 '18 at 01:03

0 Answers0