Ubuntu安装TensorFlow

Posted 把全盛的爱都活过

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu安装TensorFlow相关的知识,希望对你有一定的参考价值。

参考网站:

[1] Tensorflow官网Tutorials 
[2] 
极客学院对Tensorflow官网教程的翻译

[3] CSDN-Ubuntu下如何安装TensorFlow

http://blog.csdn.net/zhaoyu106/article/details/52793183 [CSDN]

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#pip-installation

https://www.tensorflow.org/versions/r0.11/get_started/os_setup#test_the_tensorflow_installation (官网教程)

http://blog.csdn.net/mydear_11000/article/details/52020835 (之前版本的tensorflow)

 

http://www.jianshu.com/p/636c6477250a (搭建Tensorflow虚拟机学习环境)

 

https://github.com/CreatCodeBuild/TensorFlow-Chinese-Tutorial (中文视频教程)

Ubuntu安装TensorFlow

  1. 源码安装(未成功)
  1. 安装bazel的依赖
  2. 安装bazel
    1. pip安装

Pip豆瓣源安装

https://www.douban.com/note/302711300/

使用镜像源很简单,用-i指定就行了:

Pip安装

注意tensorflow的版本以及对应的CUDA库和cuDNN版本

安装 TensorFlow :

0.8.0依赖cuda7.5cudnnv4

# Ubuntu/Linux 64-bit, CPU only, Python 2.7:

$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.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.

$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

 

# Mac OS X, CPU only:

$ sudo easy_install --upgrade six

$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl

0.12.0依赖cuda8.0cudnnv5

The GPU version works best with Cuda Toolkit 8.0 and cuDNN v5.1. Other versions are supported.

We have also uploaded the binaries to Pypi, so you can simply install tensorflow on Linux, Mac or Windows with pip install. Note you will need pip version 8.1 or later for the following commands to work on Linux :

$ pip install tensorflow

For installing the version with GPU support, please use:

$ pip install tensorflow-gpu

环境变量(未设置)

测试python是否安装成功

通过下面一段代码来测试tensorflow是否安装成功:

训练第一个网络

以上是关于Ubuntu安装TensorFlow的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu安装好vmtools怎么共享文件

ubuntu系统安装好后一些基本软件的安装

树莓派安不了ubuntu

安装好ubuntu后 怎么给硬盘分区?

Ubuntu14.04下安装chromium浏览器,安装好后,却无法使用(报错),该如何解决呢?

Ubuntu是别人安装好的,在Ubuntu下安装hadoop,无法启动hadoop,总是报需要需要停止一些进程,如下