Python – SSLError using pip install (to install tensorflow)

installationpippythonsslssl-certificate

while installing TF, exception appeared:

File
"/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/adapter.py",
line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/adapters.py",
line 447, in send
raise SSLError(e, request=request) SSLError: ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate
verify failed')],)",)

command: pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl

I have no clue how to solve this. I was recently reinstalled pip, could reinstall cause it?

Best Answer

SSL error can be solved by bellow steps for sure. Just download the wheel on your own and pip install.

# Ubuntu/Linux 64-bit, CPU only:

$ wget https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

$ sudo pip install --upgrade tensorflow-0.5.0-cp27-none-linux_x86_64.whl

# Ubuntu/Linux 64-bit, GPU enabled:

$ wget https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

$ sudo pip install --upgrade tensorflow-0.5.0-cp27-none-linux_x86_64.whl