Bench migrate + s3 backup setting = module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

I got this warn
in
bench migrate
and in
Integrations
If I want to set up
S3 backup settings:

frappe.integrations.doctype.s3 backup settings.s3 backup settings.take backups daily is not a valid method: module lib’ has no attribute *×509 V FLAG CB ISSUER CHECK

AttributeError: module lib’ has no attribute ‘X509 _V_FLAG_CB_ISSUER_CHECK’

How can I solve this problem?

Sorry found:

OpenSSL error lib has no attribute can be resolved by;

sudo apt update
sudo apt upgrade

pip3 install pip --upgrade
pip3 install pyopenssl --upgrade

env/bin/pip3 install pyOpenSSL --upgrade