ImportError: cannot import name 'appengine' from 'urllib3.contrib'

This is my error:
ImportError: cannot import name ‘appengine’ from ‘urllib3.contrib’ (/usr/local/lib/python3.8/dist-packages/urllib3/contrib/init.py)

Im new to python, starting coding months ago. Im trying to use the command
" sudo certbot --nginx --agree-tos --redirect --hsts --email emial@gmail.com -d domainname"

but am getting this error. I tried reinstalling certbot, reinstallling python packages too but no help

What OS are you using? I see python 3.8 being used that is a very old version of python.

At least on Fedora certbot is packaged for the OS and all required python files are installed and it then works.

Does your OS package certbot as well?

I’m using Ubuntu 20.04. My OS does package certbot

Please send the output of pip list --verbose.

I suspect you shadowed a system package using pip install outside of a virtual environment.