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

I had a similar error after creating a new environment (which also uses Boto3). It turned out to be a DLL error (ImportError: DLL load failed), which was caught by SSL module resulting in the error from the question: ImportError: cannot import name ssl.

Solution for me was to add an additional folder to the path: path_to_anaconda/Anaconda3/Library/bin. In that way, DLL load succeeds and the given ImportError is resolved.


Just to make sure: are you certain that you are invoking Python 2.x ?

Ubuntu 18.04 has Python 3.x as default, so make sure that you are not accidentally starting the script using another python version.


Could be some issue with installation. I did re-installed on MAC and it worked

sudo pip install awscli --ignore-installed six