question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

43reactions
anonymousscommented, Apr 12, 2017

oh… I got solution! sudo -H pip install flask --proxy="my_proxy_name:port"

0reactions
lock[bot]commented, May 28, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found