pip does not respect proxy when downloading "wheel" as a dependency
See original GitHub issueEnvironment
- 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
- From Linux on ARM, verify that wheel is not installed
- pip install scipy --proxy <proxy>
- pip errors out
- pip install wheel --proxy <proxy>
- pip install scipy --proxy <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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Python 3.7: Applying the proxy to all parts of pip installation ...
The problem I have is the proxy variable is not maintained through the installation process. It no longers has the proxy address when...
Read more >How to Use Pip with a Proxy Server - ActiveState
Click to install and use PIP with a Proxy server for security and privacy. Understand the alternative way to secure pip use.
Read more >pypiserver · PyPI
pypiserver is a minimal PyPI compatible server for pip or easy_install. It is based on bottle and serves packages from regular directories. Wheels,...
Read more >pip Documentation
For the cases where wheels are not available, pip offers pip wheel as a convenience, to build wheels for all your requirements and...
Read more >Release Notes — pip 8.1.1 documentation
Allow wheels which are not specific to a particular Python interpreter but which ... Make pip wheel and pip download work with vcs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, python 3.10.4 here. Same issue, how can I overcome this ? :
OK, I found a trick to overcome the issue. Like explained in the docs, I created the directory and file
%APPDATA%\pip\pip.ini
and added this content (the proxy configuration). Then my package installs.More specifically, pip does not correctly propagate options to the subprocess when installing PEP 517 dependencies. Could you help test whether this behaviour still happens on the latest version?