Installing without an internet connection erroneous reports requirements are up to date
See original GitHub issue- Pip version: 9.0.1
- Python version: 3.5
- Operating system: Fedora 25
Description:
Installing without an internet connection gives erroneous output.
Specifically after attempting to fetch some information from the net, it will report that a requirement is up to date. I had pytest-2.9.2 installed, and without internet it shows
Requirement already up-to-date: pytest in /usr/lib/python3.5/site-packages
With internet, it upgrades to pytest-3.0.6.
What Iβve run:
$ python3 -m pip install -U pytest
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f77960b9cc0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779605a128>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779508e4e0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779507d6d8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779507d828>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Requirement already up-to-date: pytest in /usr/lib/python3.5/site-packages
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795031f98>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795031e48>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795038080>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795038128>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795038208>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Requirement already up-to-date: py>=1.4.29 in /usr/lib/python3.5/site-packages (from pytest)
Then with an internet connection,
$ sudo python3 -m pip install -U pytest
[sudo] password for jayvdb:
Collecting pytest
Downloading pytest-3.0.6-py2.py3-none-any.whl (172kB)
100% |ββββββββββββββββββββββββββββββββ| 174kB 612kB/s
Collecting setuptools (from pytest)
Downloading setuptools-34.1.1-py2.py3-none-any.whl (389kB)
100% |ββββββββββββββββββββββββββββββββ| 399kB 624kB/s
Requirement already up-to-date: py>=1.4.29 in /usr/lib/python3.5/site-packages (from pytest)
Requirement already up-to-date: six>=1.6.0 in /usr/lib/python3.5/site-packages (from setuptools->pytest)
Requirement already up-to-date: packaging>=16.8 in /usr/lib/python3.5/site-packages (from setuptools->pytest)
Requirement already up-to-date: appdirs>=1.4.0 in /usr/lib/python3.5/site-packages (from setuptools->pytest)
Requirement already up-to-date: pyparsing in /usr/lib/python3.5/site-packages (from packaging>=16.8->setuptools->pytest)
Installing collected packages: setuptools, pytest
Found existing installation: setuptools 27.1.2
Uninstalling setuptools-27.1.2:
Successfully uninstalled setuptools-27.1.2
Found existing installation: pytest 2.9.2
Uninstalling pytest-2.9.2:
Successfully uninstalled pytest-2.9.2
Successfully installed pytest-3.0.6 setuptools-34.1.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
An error occurred while installing (any game) (no internet ...
I am directly connected to my modem so there is no wireless connection active. Any game that I have already downloaded or is...
Read more >McAfee Installer reports "No Internet Connection" (TS101825)
McAfee Installer reports "No Internet Connection" Β· Click Start Start icon at the bottom left of your Windows desktop. Β· Type Internet Options...
Read more >Fix problems installing Chrome - Google Chrome Help
Start menu or Start menu . Open the Windows Settings app. In the "Find a setting" search box, type Firewall. Click Allow an...
Read more >"Establish an Internet connection to continue" when starting ...
Solution 1: Install Transport Layer Security (TLS) updates corresponding to your Autodesk software and version. Β· Solution 2: Correct inaccurate ...
Read more >Why do I get a connection error when installing or activating ...
Just set the blocked IP to "allow permanently" to let the installer connect and download your license details, software and associated toolboxes. 1...
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 Free
Top 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
I donβt have any custom repositories setup. Only the cache. pip should give a non-zero exit status and an appropriate failure message, even βNo repositories could be reachedβ would be better.
How would this look in the following situations:
--find-links
was provided on the command-lineI could see reasonable use cases for the above that would all want different behavior, especially with respect to return code since it would be relevant to CI or any automation.
I think the best we could do here without being on the hook to make things complex later is to add an explicit warning when weβre giving up on an index:
That easy enough to grep, so enforcement that a repo is accessible in CI (for users that donβt want to pin versions) should be straightforward.