I'm trying to get Python's IBM DB2 package 'ibm-db' up and running, but my efforts keep failing so far. The problem is that I'm behind a corporate proxy which apparently prevents downloads of dependencies needed for package installation. The command I used is:
pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install --proxy=http://<host>:<port> ibm-db
This successfully downloads the package and then tries to install some build dependencies:
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001B0F00AEE60>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001B0F00AE200>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001B0F00ACEB0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001B0F128C070>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001B0F128E9B0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
AFAIK, the only dependency is DB2 ODBC CLI driver. ibm-db's installation instruction says you could skip that depenedency by installing ODBC CLI manually and then setting IBM_DB_HOME env variable to its installation directory - which I did, but without success. Pip still tries to download and install the dependency. I also used the --no-deps flag to keep pip from downloading it, but again without success.
So, is there another way to forcefully prevent dependency installation or make build dependencies work behind a proxy?
Btw: I'm using Python 3.10.5 and pip 22.0.4
EDIT: The OS is Win 10, so the CLI driver has been set using control panel. Installation is local.
Related
Earlier today my pip started exhibiting this very strange behavior where any pip install command timouts 5 times before the download starts. This is unaffected by the --default-timeout flag. For instance, doing pip install pandas I get
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60badc0\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60c7040\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60c7250\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60c7460\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
Collecting pandas
Downloading pandas-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl (11.4 MB)
|████████████████████████████████| 11.4 MB 6.9 MB/s
We would get the same exact result with connect timeout=10
I'm on
pip 21.2.4,
Python 3.8.8,
macOS 11.5.1,
and this is happening inside of a anaconda 4.11.0 virtual env with only default conda packages installed.
I've tried uninstalling and reinstalling pip, and conda. I can ping pypi.org fine. I tried this only multiple different wifi. Closing and reopening the terminal did not affect it either.
C:\Python>python get-pip.py
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002EDF31D2AD0>, 'Connection to 10.1.1.9 timed out. (connect timeout=15)')': /simple/pip/
Screenshot of the error message
I'm trying to install pip on my windows 11. I have navigated to the directory in which Python is installed. And yet, I am constantly getting the same error again and again. I haven't configured anything yet. Please guide me through the complete procedure right from the beginning by installing python.
I am trying to install pyinstaller using --proxy="" to avoid any proxy conlflicts but still it failing while Installing build dependencies and trying connect proxy which I had not mentioned anywhere.
Processing c:\users\downloads\pyinstaller-pyinstaller-v4.0-86-gad39eb8.zip
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\appdata\local\programs\python\python38\python.exe' 'c:\users\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mahesh.beeravelli\AppData\Local\Temp\pip-build-env-q0ktyno1\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (7 lines):
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002CF7FEB3610>, 'Connection to orrproxy.mphasis.com timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002CF7FEB3DC0>, 'Connection to orrproxy.mphasis.com timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002CF7FEB3F70>, 'Connection to orrproxy.mphasis.com timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002CF7FEB3E80>, 'Connection to orrproxy.mphasis.com timed out. (connect timeout=15)')': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002CF7FEB3F10>, 'Connection to orrproxy.mphasis.com timed out. (connect timeout=15)')': /simple/setuptools/
ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
ERROR: No matching distribution found for setuptools>=40.8.0
----------------------------------------
Try adding
--no-build-isolation --no-use-pep517 -vv
to your command line. It worked for me.
See
Python 3.7: Applying the proxy to all parts of pip installation, failing to maintain the proxy variable
Build Error, pip is trying to build a wheel using "pep517" #28633
I'm trying to install a library in anaconda but i have the next error (with any library I tried:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000000051CECC0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/worldcloud/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000000051CEDA0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/worldcloud/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000000051CEA90>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/worldcloud/
I want to know if exists a solution for this problem, or in other case, if I could download and charge the packages with other way.
I'm using Windows 10 and python 2.7
Welcome to Stackoverflow.
Is it possible you have an old version of pip that doesn't know to use TLS (https) communications? Find out which version you are using with
pip --version
You need to be using pip 9.0.3 or higher. If you aren't, you might solve the issue with
conda update pip
Alternatively, perhaps you have set up a proxy that pip can't use or isn't using.
In the command line of your PC, type ping pypi.org and see what happens. If there is no response, you have an external network issue. If there is one, try giving pip elevated permissions just this one time to see if it works.
Running the following command:
pip install matplotlib --disable-pip-version-check
Gives the following output:
Collecting matplotlib
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9D0F0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9DE70>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9D890>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9D8D0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9DD90>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Could not find a version that satisfies the requirement matplotlib (from versions: )
No matching distribution found for matplotlib
Check your Internet connection.
It seems that the Internet is unreachable for you. Less likely, PyPi is experiencing temporary problems and you should try connecting later.
Very simple methods step by step:-
Download matplotlib(.whl) from http://www.lfd.uci.edu/~gohlke/pythonlibs/
matplotlib also Requires numpy, dateutil, pytz, pyparsing, cycler, setuptools
process:
open>python27>>Scripts>copy and paste matplotlib.whlfile
open cmd on python27>Scripts>pip install matplotlib-1.5.1-cp27-none win_amd64.whl
I think this is the simplest install method.
Just try it if you face again same problem then ping me.
Another possible solution - I found an executable installer here
Didn't find it with Google before.
Try ignoring the cache:
pip install matplotlib --no-cache
No idea how this works, because when it said ConnectionTimeoutError, I assumed that it was not using the cache. If this works for anyone, I'd love to hear an explanation.