This happens when your machine does not have the correct certificate bundle to access the Pypi repository, or you are behind a corporate proxy that just loves to block everything!
An easy way to get around this is to edit (or create) a local pip.conf file under your home directory:
Put the following in:
Code language: PHP (php)
[global] index-url = http://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com
As you can see, we have changed the download location to a mirror that doesn’t use HTTPS, so there will be no certificate issues.
Do note that this is NOT a general long term option, but rather something you can use to get the job done if you are well and truly stuck!