"SSLError certificate verify failed" for every domain/url
Question: I broke the SSL setup of my machine. Every `request` call now ends in an
`certificate verify failed`.

I am not sure what caused this, but I moved some module, that I had installed
va `pip install -e .` and reinstalled it. After that I noticed that error.

I tried `sudo apt-get install libffi-dev` and `pip install requests[security]
--user --upgrade` but it did not help.

Here the whole output:

    
    
    import requests; requests.get('https://www.google.com')
    
    ---------------------------------------------------------------------------
    SSLError                                  Traceback (most recent call last)
    <ipython-input-1-b4a9dae5ffaa> in <module>()
          1 import requests
    ----> 2 requests.get('https://www.google.com')
    
    /home/my_computer/.local/lib/python2.7/site-packages/requests/api.pyc in get(url, params, **kwargs)
         65 
         66     kwargs.setdefault('allow_redirects', True)
    ---> 67     return request('get', url, params=params, **kwargs)
         68 
         69 
    
    /home/my_computer/.local/lib/python2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
         51     # cases, and look like a memory leak in others.
         52     with sessions.Session() as session:
    ---> 53         return session.request(method=method, url=url, **kwargs)
         54 
         55 
    
    /home/my_computer/.local/lib/python2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
        466         }
        467         send_kwargs.update(settings)
    --> 468         resp = self.send(prep, **send_kwargs)
        469 
        470         return resp
    
    /home/my_computer/.local/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
        574 
        575         # Send the request
    --> 576         r = adapter.send(request, **kwargs)
        577 
        578         # Total elapsed time of the request (approximately)
    
    /home/my_computer/.local/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
        445         except (_SSLError, _HTTPError) as e:
        446             if isinstance(e, _SSLError):
    --> 447                 raise SSLError(e, request=request)
        448             elif isinstance(e, ReadTimeoutError):
        449                 raise ReadTimeout(e, request=request)
    
    SSLError: bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)
    


Answer: It is the same issue as here: [SSL3_GET_SERVER_CERTIFICATE certificate verify
failed on Python when requesting (only)
*.google.com](http://stackoverflow.com/questions/34646942/ssl3-get-server-
certificate-certificate-verify-failed-on-python-when-requesting?rq=1)

To fix one needs to run:

    
    
    pip uninstall -y certifi && pip install certifi==2015.04.28
    

