Skip to content

pip does not respect proxy when downloading "wheel" as a dependency #7805

@SamuraiAku

Description

@SamuraiAku

Environment

  • pip version: 18.0
  • Python version: 3.5.6
  • OS: linux

Platform: Xilinx Ultrascale+

Description

When using --proxy, pip normally downloads any required dependencies for the requested package without issue. But there is an edge condition when the dependency is "wheel". In this case, the attempt to download errors out because pip is not going through the proxy. The workaround is to install wheel separately first. This was observed when trying to download and build scipy 1.4.1 from source.

Expected behavior

pip downloads wheel through the proxy.

How to Reproduce

  1. From Linux on ARM, verify that wheel is not installed
  2. pip install scipy --proxy
  3. pip errors out
  4. pip install wheel --proxy
  5. pip install scipy --proxy

It's ok if the scipy installation errors out because you don't have the compilers and required libraries setup. The error described here occurs before you reach that point.

Output

home# pip3 install scipy --proxy proxy1.lmco.com:80 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org Collecting scipy
  Downloading https://files.pythonhosted.org/packages/04/ab/e2eb3e3f90b9363040a3d885ccc5c79fe20c5b8a3caa8fe3bf47ff653260/scipy-1.4.1.tar.gz (24.6MB)
    100% |################################| 24.6MB 3.8MB/s
  Installing build dependencies ... error
  Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-d3vvzxn3 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -- wheel setuptools Cython>=0.29.13 "numpy==1.13.3; python_version=='3.5' and platform_system!='AIX'" "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'" "numpy==1.14.5; python_version=='3.7' and platform_system!='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system!='AIX'" "numpy==1.16.0; python_version=='3.5' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.7' and platform_system=='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system=='AIX'" pybind11>=2.4.0:
  Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.5" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
  Collecting wheel
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75860>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75710>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75630>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a757b8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75208>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Could not find a version that satisfies the requirement wheel (from versions: )
  No matching distribution found for wheel

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-d3vvzxn3 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -- wheel setuptools Cython>=0.29.13 "numpy==1.13.3; python_version=='3.5' and platform_system!='AIX'" "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'" "numpy==1.14.5; python_version=='3.7' and platform_system!='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system!='AIX'" "numpy==1.16.0; python_version=='3.5' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.7' and platform_system=='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system=='AIX'" pybind11>=2.4.0" failed with error code 1 in None

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: PEP 517 impactAffected by PEP 517 processingC: proxyDealing with proxies and networkingresolution: duplicateDuplicate of an existing issue/PRtype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions