sudo pip install encountered NewConnectionError
See original GitHub issue- Pip version: 9.0.1
- Python version: 2.7.6
- Operating system: Ubuntu 14.04.5
Description:
I’m trying to install flask in Ubuntu.
If I use pip install flask
, packages can be downloaded successfully, but installation will encounter permission issue.
So, I tried sudo -H pip install flask
. however, packages can’t even be downloaded now…
error information as below:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1ebfdc3dd0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1ebfe0ee90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1ebfe0edd0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1ebfe0ecd0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1ebfd59750>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask
Note: issue not only occurs in flask
What I’ve run:
I’ve tried to modify /etc/resolv.conf
, add nameserver 8.8.8.8
& nameserver 8.8.4.4
, it doesn’t work.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Python pip raising NewConnectionError while installing libraries
I've Python 3 running in a linux ...
Read more >Unable to install packages - Python Forum
Hi, I am pretty new to Python. Installed default Python from Python.org since I cannot install other IDE in my office laptop.
Read more >Error while installing Python modules like requests | AIX Open ...
opt/bin/python3 -m pip install requests-2.28.0WARNING: Retrying (Retry(total=4 ... ERROR: No matching distribution found for requests-2.28.0.
Read more >Difficulty in installing scrapy - Google Groups
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev ... redirect=None)) after connection broken by 'NewConnectionError('<pip.
Read more >Error installing modules - Python Programming Tutorials
So I'm having a problem installing the modules.Whenever I try ,it gives this error.. C:UsersDell>pip install matplotlib. Collecting matplotlib. Retrying (Retry( ...
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
oh… I got solution!
sudo -H pip install flask --proxy="my_proxy_name:port"
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.