Ubuntu:Installing TensorFlow from Sources(CPU Only)
来源:互联网 发布:php网页联机游戏源码 编辑:程序博客网 时间:2024/06/01 08:15
环境说明
系统:Ubuntu-17.04-desktop-amd64
版本:Python3.5
1.Clone the TensorFlow repository
To clone the latest TensorFlow repository
$ git clone https://github.com/tensorflow/tensorflow
Optionally build a specific branch(such as a release branch)
$ cd tensorflow$ git checkout Branch # where Branch is the desired branch
For example,to work with the r1.0 release instead of the master release
$ git checkout r1.0
2.Install Bazel
1.Install JDK 8
$ sudo apt-get install openjdk-8-jdk
2.Add Bazel distribution URI as a package source
$ echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list$ curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
3.Install and update Bazel
$ sudo apt-get update$ sudo apt-get install bazel$ sudo apt-get upgrade bazel
3.Install TensorFlow Python dependencies
To install TensorFlow,you must install the following packages:
- Numpy,which is a numerical processing package that TensorFlow requires .
- dev,which enables adding extensions to Python
- pip,which enables you to install and manage certain Python packages.
- wheel,which enables you to manage Python compressed packages in the wheel(.whl) format.
$ sudo apt-get install python3-numpy python3-dev python3-pip python3-wheel
4.Configure the installation
$ cd tensorflow$ ./configure
配置除一下列举处,一律回车
Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3.5Please input the desired Python library path to use. [Default is /usr/lib/python3.5/dist-packages]: /usr/local/lib/python3.5/dist-packages
5.Build the pip package
$ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
6.Install the pip package
The filename of the .whl file depends on your platform.
$ sudo pip3 install /tmp/tensorflow_pkg/*.whl
TensorFlow历尽千辛万苦终于通过源码安装完毕.可以开始我们的”HelloWorld“检查一下.
阅读全文
0 0
- Ubuntu:Installing TensorFlow from Sources(CPU Only)
- Installing TensorFlow from Sources
- Installing Caffe+pycaffe on Ubuntu (CPU-ONLY)
- TensorFlow cpu-only 安装记录
- Installing TensorFlow on Ubuntu 1.3
- Installing from Source Under Ubuntu
- Ubuntu 16.04安装tensorflow,theano,keras和caffe,针对CPU only
- Installing ImageMagick from Source on Ubuntu 8.04
- ubuntu / Installing MySQL 5.6.x from source
- [TensorFlow 学习笔记-01]Windows下TensorFlow(Only CPU)安装
- Nginx--官网中文翻译(中英文对比)--Installing nginx-Building from Sources
- Ubuntu下安装Tensorflow(CPU)
- Ubuntu 14.04安装caffe only CPU
- Ubuntu 16.04上安装Caffe(CPU only)
- Ubuntu安装caffe指南(cpu only)
- Ubuntu下安装Caffe(CPU Only)
- ubuntu 16.04 cpu only 安装caffe
- Ubuntu 17.04 py-faster-rcnn only CPU
- spring.net基本使用:控制反转和依赖注入
- 高级测试
- 我们如何提升——写给测试新人
- HDU6208 The Dominator of Strings AC自动机 [2017 ACM/ICPC Asia Regional Qingdao Online]
- 基于HTML模板和JSON数据的JavaScript交互
- Ubuntu:Installing TensorFlow from Sources(CPU Only)
- web:输入框灰字
- BZOJ 2969 浅谈矩阵期望动态规划面积分布式转移
- 顺序表应用6:有序顺序表查询
- js获取URL参数以及Struts2与ajax json的交互
- 比特币解析
- CCF—ISBN号码 20131202
- Django note4
- 锁存器作用