linux下安装TensorFlow(centos)
一、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.9
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
其他操作系统版本可以参照下表:
# Ubuntu/Linux -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 -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 -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 -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 -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 -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结果如下:
大功告成。
参考:http://blog.csdn.net/chuchus/article/details/51713389
linux下安装TensorFlow(centos)的更多相关文章
- linux下安装nginx,centos安装nginx
初学nginx,进行简单的安装和配置. 一.依赖 openssl-fips-2.0.9.tar.gz zlib-1.2.11.tar.gz pcre-8.01.tar.gz nginx-1.8.0.t ...
- Linux下安装tensorflow
- CentOS linux下安装和配置Apache+SVN(用浏览器http方式访问SVN目录)
在CentOS linux下安装SVN,我们可以进行以下步骤: 第一步:安装CentOS Linux操作系统,并在CentOS安装进行的同时,自定义安装这一步,一定要勾选Subversion(在“开发 ...
- Linux下安装mysql(2) 及常见问题解决(CentOS)
上一篇讲了基本的安装,这篇姑且算作进阶吧 链接Linux下安装mysql(1) 1.准备好mysql的rpm安装包 2.解压并进入usr/local/mysql 3.先执行useradd mysql( ...
- Linux下安装mysql(1)(CentOS)
标题是(1)也就是说这次是基础安装,这种方式安装,没有组的创建,权限管理,配置文件更改等,仅仅是最基本的安装,适合第一次在linux上安装mysql的新手 1.准备好安装包(Linux-Generic ...
- Linux下安装 Posgresql 并设置基本参数
在Linux下安装Postgresql有二进制格式安装和源码安装两种安装方式,这里用的是二进制格式安装.各个版本的Linux都内置了Postgresql,所以可直接通过命令行安装便可.本文用的是Cen ...
- linux下安装uuid库
1.linux 下安装UUID库 1.1)ubuntu下安装uuid链接库 sudo apt-get install uuid-dev 1.2)CentOS yum install libuuid-d ...
- (转)Linux下安装rar fou linux
在Linux下安装rar fou linux rar for linux 软件下载地址:http://www.rarsoft.com/download.htm 到目前为止最新的版本为4.10 beta ...
- 03 在Linux下安装Myeclipse及Tomcat(含下载)
测试环境: 主机系统:Win 7 虚拟机:VMware workstation 11.1.0 虚拟机OS: centos 6.5 64位 Kernel 2.6.32-431-e16.x86_64 My ...
随机推荐
- python之路:进阶篇 内置函数
li = [11, 22, 33] news = map( li = [100, 2200, 3300] news = map( [13, 24, 35] [11, 11, 11] [22, 4 ...
- ural2014 Zhenya moves from parents
Zhenya moves from parents Time limit: 1.0 secondMemory limit: 64 MB Zhenya moved from his parents’ h ...
- vim 配置快捷以使复制可用
"设置快捷以使用xshell的复制 let g_copy_mode = function! CopyToggle() let g:g_copy_mode = set mouse=c set ...
- Apriori算法第一篇
摘要: Apriori算法是产生k项高频项目组的一般手段.算法概要:首先产生k项高频项目集合Lk,自身链接形成k+1项的项目结合C(k+1),然后剪枝(去掉以前去掉的不满足支持度的高频),生成K=1项 ...
- awk命令详解二
awk命令详解 简单使用: awk :对于文件中一行行的独处来执行操作 . awk -F :'{print $1,$4}' :使用‘:’来分割这一行,把这一行的第一第四个域打印出来 . 详细介绍: ...
- javascript模拟鼠标双击事件
通常我们在做开发的时候需要通过单击切换对立事件,简单做了一个模型. <!DOCTYPE html> <html> <head> <title>javas ...
- HDU 5651 xiaoxin juju needs help
组合数杨辉三角打表,这样避免了除法求逆元. #include<cstdio> #include<cstring> #include<cmath> #include& ...
- 3505: [Cqoi2014]数三角形
3505: [Cqoi2014]数三角形 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 1324 Solved: 807[Submit][Statu ...
- Adaptive Server Enterprise ODBC driver connection strings
Adaptive Server Enterprise 15.0 Driver={Adaptive Server Enterprise};app=myAppName;server=myServerAdd ...
- Java6 WebService学习
首先,建立一个WebService: package garfield; import javax.jws.WebService; import javax.xml.ws.Endpoint; @Web ...