diff --git a/docs/html/user_guide.rst b/docs/html/user_guide.rst index 73a2643223b..24291181cee 100644 --- a/docs/html/user_guide.rst +++ b/docs/html/user_guide.rst @@ -788,7 +788,10 @@ archives are built with identical packages. to use such a package, see :ref:`Controlling setup_requires`. -.. _`Using pip from your program`: +Fixing network errors +===================== + +TODO Fixing conflicting dependencies =============================== diff --git a/src/pip/_internal/index/collector.py b/src/pip/_internal/index/collector.py index b86f62f4624..8a253accfef 100644 --- a/src/pip/_internal/index/collector.py +++ b/src/pip/_internal/index/collector.py @@ -460,6 +460,16 @@ def _get_html_page(link, session=None): except SSLError as exc: reason = "There was a problem confirming the ssl certificate" logger.warning("Could not fetch URL %s: %s: %s", link, reason, exc) + except requests.ConnectTimeout: + template = ( + "Skipping URL %s since the connection timed out. This is likely " + "caused by a misconfigured network." + ) + logger.warning(template, link) + logger.warning( + "For help, visit " + "https://pip.pypa.io/en/latest/user_guide/#fixing-network-errors" + ) except requests.ConnectionError as exc: reason = "connection error" logger.warning("Could not fetch URL %s: %s: %s", link, reason, exc)