I used python3 -m venv to create a virtual environment, in that virtual environment my settings are:
python 3.5.2 pip 8.1.1 Mac OS 10.13.6
That pip version is extremely OLD and leads to a problem described below: how do I get venv to install a newer version of pip?
Whenever I run "pip install " I get an error of the form:
Could not fetch URL https://pypi.python.org/simple/<any_package>/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping I have tried this with = flask, gunicorn, and requests and believe that it's not a package specific problem.
What I tried to fix the problem:
I came across this link which suggested I should upgrade pip somehow: https://github.com/pypa/pip/issues/5226
So I upgraded pip up to the latest version: pip 20.0.2 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip (python 3.5)
But the problem persisted. So then I upgraded venv to the latest version.
But the problem persisted again.
I did some more research online and came across the following github issue: https://github.com/pypa/pip/issues/5363
Which had as part of the problem statement text very similar to my TLS issue, but none of the answers there seemed to be able to fix the problem (pasting each one resulted in the same TLS issue).
Finally I found something that worked:
From this question: Upgrading pip/installing django - [SSL: TLSV1_ALERT_PROTOCOL_VERSION]
The solution below:
curl https://bootstrap.pypa.io/get-pip.py | python3 Upgrades my "virtual enviromnet's pip" to the correct version. But I yet to figure out how to get my default pip (when I create a new virtual environment) to be up to date.