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
I've tried to modify /etc/resolv.conf
, add nameserver 8.8.8.8
& nameserver 8.8.4.4
, it doesn't work.
Thanks
oh... I got solution!
sudo -H pip install flask --proxy="my_proxy_name:port"
why do we need to use proxy?
maybe it's beacuse some websites are blocked in my region, while this package happens to store data in one of this sites...
It's just a possible way to solve such connection issue and it happened to be workable to me. You don't need to do this if you don't have this issue.
Thanks! This helped.
you can check the network if work
Thanks!
why do we need to use proxy?
@shiplu, https://www.quora.com/Why-do-we-use-proxy-servers
This might help
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.
Most helpful comment
oh... I got solution!
sudo -H pip install flask --proxy="my_proxy_name:port"