在ubuntu16.04上安装tersonflow出现以下错误提示:

这不是安装错误,安装tersonflow这一步时间比较长,由于网络原因安装失败
我实践有效的方法就,在早晨七点开始安装容易成功,如果还是提示错误,就多尝试几次。
- 安装任意版本tersonflow
sudo pip3 install tensorflow==1.9
为了下载的快一点可以加上国内镜像的链接,使用下面指令。
sudo pip3 install tensorflow==1.4 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
2. 测试是否安装成功
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2020-04-09 07:18:43.879592: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
>>> print (sess.run(hello))
b'Hello, TensorFlow!'
>>> a = tf.constant(12)
>>> b = tf.constant(34)
>>> print(sess.run(a+b))
46
>>>
本文提供在Ubuntu16.04环境下安装TensorFlow的详细步骤及网络不稳定时的解决策略,包括使用国内镜像加速下载,以及如何验证安装是否成功。
1605

被折叠的 条评论
为什么被折叠?



