ImportError: cannot import name ‘ssl’ from ‘urllib3.util.ssl_’

I was running an old script for one of my client today. The script was written in Python. And I was running python 3.7.4 while I was developing it. It always works. However, when I ran it later today. I was getting the following ssl error.

ImportError: cannot import name 'ssl' from 'urllib3.util.ssl_'

After the investigation, that’s due to broken pip. So what I did is to install python 3.8 and upgrade pip to the latest version. And re-deploy the virtualenv environment. The script start working again.