SSLError使用pip install(安装tensorflow)

Snu*_*ill 9 python installation ssl pip ssl-certificate

安装TF时出现异常:

文件"/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/adapter.py",第46行,发送resp = super(CacheControlAdapter,self).send(request,**kw)文件"/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/adapters.py",第447行,发送引发SSLError(e,request = request)SSLError :("握手不好:错误([('SSL例程','SSL3_GET_SERVER_CERTIFICATE','证书验证失败')],)",)

command: pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl
Run Code Online (Sandbox Code Playgroud)

我不知道如何解决这个问题.我最近重新安装了pip,可以重装原因吗?

Kaz*_*zan 16

SSL错误可以通过以下步骤确定.只需自己下载轮子并点击安装即可.

#Ubuntu/Linux 64位,仅限CPU:

$ 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位,支持GPU:

$ 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

  • 谢谢!但说实话,这并不能解决SSL错误,它只是一个旁路. (4认同)