Centos python36 安装tensorflow记录

python,pip 这些自己安装。

pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
如果上面的不行,执行下面这个。

pip3 install  https://pypi.python.org/packages/9c/9b/c20aab2499ad42b4f473bb17749bbb42dc797a2b083c86dce6abb90111f3/tensorflow-1.2.0rc1-cp36-cp36m-manylinux1_x86_64.whl#md5=fecda7af7028e73871840c917d1d52a8
tensorflow测试
>>> import tensorflow as tf
>>> hello = tf.constant("hello,TensorFlow!")
>>> sess = tf.Session()
2017-11-14 19:14:11.783266: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-14 19:14:11.783310: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-14 19:14:11.783318: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-11-14 19:14:11.783324: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-14 19:14:11.783330: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
>>> print(sess.run(hello))
b'hello,TensorFlow!'
>>> a = tf.contant(10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'contant'
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a+b))
42
>>> 
>>> exit()
#上面的代码出现了tensorflow的警告。如何关闭?参见参考最后一条链接。

参考:
http://blog.youkuaiyun.com/guotch/arcticle/details/72983856?utm_source=itdadao&utm_medium=referral

http://blog.youkuaiyun.com/nicholas_wong/article/details/70215127

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值