title: How to install packages using pip through corporate proxy with configuration script?
body: <p>I am not able to install any packages using pip. I'm behind a corporate proxy which is configured using a proxy script. The proxy file is in the format described <a href="https://en.wikipedia.org/wiki/Proxy_auto-config" rel="nofollow noreferrer">on Wikipedia</a>.</p>
  
  <p>OS: Windows 10 Enterprise 64-bit<br>
  Python version: 3.7.4<br>
  Pip version: 19.0.3</p>
  
  <p>After reading through various other questions here on stackoverflow, I've tested different kinds of options, some of which result in different errors:</p>
  
  <ol>
  <li>No extra options:</li>
  </ol>
  
  <pre><code>pip install scipy --verbose
  </code></pre>
  
  <pre><code>Collecting scipy
    1 location(s) to search for versions of scipy:
    * https://pypi.org/simple/scipy/
    Getting page https://pypi.org/simple/scipy/
    Looking up "https://pypi.org/simple/scipy/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    Incremented Retry for (url='/simple/scipy/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(&lt;pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x068AD410&gt;, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/scipy/
  </code></pre>
  
  <ol start="2">
  <li>Setting the proxy to setting to point to the config file:</li>
  </ol>
  
  <pre><code>pip install scipy --verbose --proxy http://&lt;redacted&gt;.com/proxy.pac
  </code></pre>
  
  <pre><code>Collecting scipy
    1 location(s) to search for versions of scipy:
    * https://pypi.org/simple/scipy/
    Getting page https://pypi.org/simple/scipy/
    Looking up "https://pypi.org/simple/scipy/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    Incremented Retry for (url='/simple/scipy/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /simple/scipy/
  </code></pre>
  
  <ol start="3">
  <li>Setting the trusted hosts as suggested for example <a href="https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi?page=1&amp;tab=votes#tab-top">here</a></li>
  </ol>
  
  <pre><code>pip install scipy --proxy http://&lt;redacted&gt;.com/proxy.pac --verbose --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org
  </code></pre>
  
  <p>...gets me the same result as before in attempt 2. How to proceed? The SSL error is strange and I don't know what to do next.</p>