#run this in your terminal sudo /Applications/Python\ 3.7/Install\ Certificates.command #If you use other python version, only change versión number (In my case, i have Python 3.7)
Here is what the above code is Doing:
1. It’s creating a folder called .pip in your home directory.
2. It’s creating a file called pip.conf in that folder.
3. It’s adding the following lines to that file:
trusted-host = pypi.org
pypi.org = 443
files.pythonhosted.org = 443
4. It’s running the command sudo /Applications/Python\ 3.7/Install\ Certificates.command