Unable to execute pip install -r requirements.txt

I am following the instructions for installing the python packages and keep getting errors.
I did some research and found that others have reported the problem in stackoverflow and other sites. I have tried the various solutions provided and none of them work.
Here is the verbose output.

C:\Users\mfarooq\Documents\MongoDBBasicTraining\M220P\mflix-python>pip install --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org -r requirements.txt -vvv
Config variable ‘Py_DEBUG’ is unset, Python ABI tag may be incorrect
Config variable ‘WITH_PYMALLOC’ is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\mfarooq\AppData\Local\Temp\pip-ephem-wheel-cache-ohxqwuap
Created temporary directory: C:\Users\mfarooq\AppData\Local\Temp\pip-req-tracker-e5_cyxl9
Created requirements tracker ‘C:\Users\mfarooq\AppData\Local\Temp\pip-req-tracker-e5_cyxl9’
Created temporary directory: C:\Users\mfarooq\AppData\Local\Temp\pip-install-mgm6hgpa
Collecting Flask==0.12.4 (from -r requirements.txt (line 1))
1 location(s) to search for versions of Flask:

  • https://pypi.org/simple/flask/
    Getting page https://pypi.org/simple/flask/
    Starting new HTTPS connection (1): pypi.org:443
    Incremented Retry for (url=’/simple/flask/’): Retry(total=4, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9D9ED1278>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)’: /simple/flask/
    Starting new HTTPS connection (2): pypi.org:443
    Incremented Retry for (url=’/simple/flask/’): Retry(total=3, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9D9ED1160>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)’: /simple/flask/
    Starting new HTTPS connection (3): pypi.org:443
    Incremented Retry for (url=’/simple/flask/’): Retry(total=2, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9D9ED1358>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)’: /simple/flask/
    Starting new HTTPS connection (4): pypi.org:443
    Incremented Retry for (url=’/simple/flask/’): Retry(total=1, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9D9EB4358>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)’: /simple/flask/
    Starting new HTTPS connection (5): pypi.org:443
    Incremented Retry for (url=’/simple/flask/’): Retry(total=0, connect=None, read=None, redirect=None, status=None)
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9D9EB40F0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)’: /simple/flask/
    Starting new HTTPS connection (6): pypi.org:443
    Could not fetch URL https://pypi.org/simple/flask/: connection error: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/flask/ (Caused by NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9D9EB4860>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)) - skipping
    Could not find a version that satisfies the requirement Flask==0.12.4 (from -r requirements.txt (line 1)) (from versions: )
    Cleaning up…
    Removed build tracker ‘C:\Users\mfarooq\AppData\Local\Temp\pip-req-tracker-e5_cyxl9’
    No matching distribution found for Flask==0.12.4 (from -r requirements.txt (line 1))
    Exception information:
    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\cli\base_command.py”, line 179, in main
    status = self.run(options, args)
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\commands\install.py”, line 315, in run
    resolver.resolve(requirement_set)
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\resolve.py”, line 131, in resolve
    self._resolve_one(requirement_set, req)
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\resolve.py”, line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\resolve.py”, line 242, in _get_abstract_dist_for
    self.require_hashes
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\operations\prepare.py”, line 269, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\req\req_install.py”, line 196, in populate_link
    self.link = finder.find_requirement(self, upgrade)
    File “C:\ProgramData\Anaconda3\lib\site-packages\pip_internal\index.py”, line 688, in find_requirement
    ‘No matching distribution found for %s’ % req
    pip._internal.exceptions.DistributionNotFound: No matching distribution found for Flask==0.12.4 (from -r requirements.txt (line 1))
    Config variable ‘Py_DEBUG’ is unset, Python ABI tag may be incorrect
    Config variable ‘WITH_PYMALLOC’ is unset, Python ABI tag may be incorrect
    1 location(s) to search for versions of pip:
  • https://pypi.org/simple/pip/
    Getting page https://pypi.org/simple/pip/
    Starting new HTTPS connection (1): pypi.org:443
    Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by NewConnectionError(’<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000002F9DA743748>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’)) - skipping

Seems like a network issue. Make sure your firewall is disabled and your network is stable while running the commands.

Kanika