Reputation: 133
An exception occurs while installing a package using pip. I tried installing NumPy, Flask and others, but I am getting the below error.
pip install flask
Collecting flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667CB50>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C190>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C7F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C8F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0667C0F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/flask/
Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask
How can I resolve it?
The pip version is 18.1, and the Python version is 3.7.
Upvotes: 13
Views: 75062
Reputation: 12181
In my case, I got a similar error and it ended up just being a typo: I tried to install flask_coors
when it should have actually been flask_cors
.
Upvotes: 0
Reputation: 1
Nothing worked out for me just installing python version 3.6.4 64-bit resolved the issue.
you can download from the below link: https://www.python.org/downloads/release/python-364/
Upvotes: 0
Reputation: 1
Try to change your internet connection if all above doesn't work.
Upvotes: 0
Reputation: 438
Okay, this is a hack that I always follow, but it works every time - I need to because my corporate network is behind heavy layered security.
Every time you need to install pip packages, run the following commands beforehand from your cmd (you don't need to be administrator):
set http_proxy=http://your_corp_username:password@<your_corp_proxy_host>:<port>
set https_proxy=https://your_corp_username:password@<your_corp_proxy_host>:<port>
Then run your usual pip commands.
If pip throws some SSL trust/resolution error, you can also do the following to trust pip by your network:
pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install <some_package>
Use the following for installing packages under the current user only (this doesn't require administrator privileges)
pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install <some_package> --user
Upvotes: 11
Reputation: 4088
It seems that for current release v1.0.2 Python 3.7 is not supported yet. Its support does exist in the master branch, but not yet released.
Upvotes: 1