linux下安装TensorFlow(centos)
2017-09-05 09:02
323 查看
一、python安装
centos自带python2.7.5,这一步可以省略掉。
二、python-pip
pip--python index package,累世linux的yum,安装管理python软件包用的。yum install python-pip python-devel
三、安装tensorflow
安装基于linux和python2.7的tensorflow 0.9pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl[/code]
其他操作系统版本可以参照下表:
# Ubuntu/Linux 64-bit, CPU only, Python 2.7 export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl # Ubuntu/Linux 64-bit, GPU enabled, Python 2.7 # Requires CUDA toolkit 7.5 and CuDNN v4. For other versions, see "Install from sources" below. export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl # Mac OS X, CPU only, Python 2.7: export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py2-none-any.whl # Ubuntu/Linux 64-bit, CPU only, Python 3.4 export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp34-cp34m-linux_x86_64.whl # Ubuntu/Linux 64-bit, GPU enabled, Python 3.4 # Requires CUDA toolkit 7.5 and CuDNN v4. For other versions, see "Install from sources" below. export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp34-cp34m-linux_x86_64.whl # Ubuntu/Linux 64-bit, CPU only, Python 3.5 export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp35-cp35m-linux_x86_64.whl # Ubuntu/Linux 64-bit, GPU enabled, Python 3.5 # Requires CUDA toolkit 7.5 and CuDNN v4. For other versions, see "Install from sources" below. export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp35-cp35m-linux_x86_64.whl # Mac OS X, CPU only, Python 3.4 or 3.5: export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py3-none-any.whl编写python脚本 test.py
四、测试安装是否成功import tensorflow as tf hello = tf.constant('Hello,TensorFlow!') sess = tf.Session() print(sess.run(hello)) a = tf.constant(10) b = tf.constant(32) print(sess.run(a + b))
运行 python test.py结果如下:
大功告成。
相关文章推荐
- 在linux(centos)上从源码安装tensorflow
- 在linux(centos)上从源码安装tensorflow
- 在linux(centos)上从源码安装tensorflow
- 在linux(centos)上从源码安装tensorflow
- Linux学习第二节课-VMware虚拟机安装及Centos安装相关概念
- Linux下面CentOS 7桌面的安装
- linux(centos7)+apache+php7 安装教程
- linux下安装htk工具箱并运行demo[centos6.5]
- Linux(CentOS6.3)三种安装方法(U盘,硬盘,光盘)
- 【转】Linux(CentOS) vps安装xfce桌面+VNC
- Mysql(5.6.35)在Linux(Centos 6.8)上安装
- Linux(Ubantu)下安装TensorFlow ------赵豫
- 42、Linux初步(CentOS 7下安装JDK)
- jdk tomcat solr mmseg4j linux centos 安装
- Linux下安装Mysql(CentOS7 64位,MySQL5.7)详细!!!
- Linux(Centos5.4)上安装oracle10gR2(10.2.1)
- [Linux]在CentOS 6.5上安装MySQL
- 在linux CentOS系统上安装g++
- linux centos 6.4下eclipse的安装
- Linux Kickstart无人值守安装centos6.5(NFS+TFTP+DHCP)