Install any package There was a problem confirming the ssl certificate python2

Fixing SSL Issues on Old Systems

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py > get-pip.py

sudo python get-pip.py

Error is something like this

Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",) - skipping
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages


Collecting sendgrid
Could not fetch URL https://pypi.python.org/simple/sendgrid/: There was a problem confirming the ssl certificate: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",) - skipping
Could not find a version that satisfies the requirement sendgrid (from versions: )
No matching distribution found for sendgrid
You are using pip version 8.1.2, however version 24.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. 

 

 

1. Download the latest version of pip manually

Use wget or curl to download the latest version of pip.

wget https://bootstrap.pypa.io/get-pip.py

2. Install pip

After downloading get-pip.py, run it to install or upgrade pip.

python get-pip.py

3. Upgrade pip

After installing the latest version of pip, you will be able to upgrade and install packages without SSL issues.

pip install --upgrade pip

4. Verify the installation

Ensure that pip has been successfully upgraded.

pip --version

5. Install the necessary packages

Now you can install email-validator or any other packages.

pip install email-validator

If you still encounter problems, you can manually download the package and install it:

1. Download the package

Find the required package on PyPI and download it.

wget https://files.pythonhosted.org/packages/.../email_validator-X.X.X-py3-none-any.whl

2. Install the package manually

Install the downloaded package using pip.

pip install /path/to/downloaded/email_validator-X.X.X-py3-none-any.whl

If the issue persists, you may need to update your system or its components to avoid problems with outdated certificates and libraries. 


 

Comments