Calling Boto's get_all_bucket gives an SSL error

I am trying to connect to S3 through Boto. however it is giving me an SSL error (certificate verify failed). I do have buckets with dot in its name and according to several posts, i changed my code to as follow:

self.s3 = boto.s3.connect_to_region(server_loc,
            is_secure = isSecure)

and my call to get all bucket is: allBuckets = self.s3.get_all_bucket() and the error persisted

The current work around is to brew install python and this error somehow goes away. However, I am wondering whether there is a way to not require brew install python? What magic did brew install python actually do?

(I am developing an desktop application with python 2.7.10)