Added "NOTE: You may only install TensorFlow on 64-bit machines" to all the

TensorFlow Install guides.

PiperOrigin-RevId: 173899394
This commit is contained in:
A. Unique TensorFlower 2017-10-30 08:52:31 -07:00 committed by TensorFlower Gardener
parent b73743e3a0
commit 494672475b
7 changed files with 87 additions and 57 deletions

View File

@ -9,10 +9,13 @@ The API leans towards simplicity and uniformity rather than convenience.
## Supported Platforms ## Supported Platforms
You may install TensorFlow for C on the following operating systems: This guide explains how to install TensorFlow for C. Although these
instructions might also work on other variants, we have only tested
(and we only support) these instructions on machines meeting the
following requirements:
* Linux * Linux, 64-bit, x86
* Mac OS X * macOS X, Version 10.11 (El Capitan) or higher
## Installation ## Installation
@ -26,13 +29,13 @@ enable TensorFlow for C:
following guides: following guides:
* @{$install_linux#determine_which_tensorflow_to_install$Installing TensorFlow on Linux} * @{$install_linux#determine_which_tensorflow_to_install$Installing TensorFlow on Linux}
* @{$install_mac#determine_which_tensorflow_to_install$Installing TensorFlow on Mac OS} * @{$install_mac#determine_which_tensorflow_to_install$Installing TensorFlow on macOS}
2. Download and extract the TensorFlow C library into `/usr/local/lib` by 2. Download and extract the TensorFlow C library into `/usr/local/lib` by
invoking the following shell commands: invoking the following shell commands:
TF_TYPE="cpu" # Change to "gpu" for GPU support TF_TYPE="cpu" # Change to "gpu" for GPU support
OS="linux" # Change to "darwin" for Mac OS OS="linux" # Change to "darwin" for macOS
TARGET_DIRECTORY="/usr/local" TARGET_DIRECTORY="/usr/local"
curl -L \ curl -L \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${OS}-x86_64-1.4.0-rc0.tar.gz" | "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${OS}-x86_64-1.4.0-rc0.tar.gz" |
@ -57,9 +60,9 @@ enable TensorFlow for C:
directory (for example, `~/mydir/lib`) to two environment variables. directory (for example, `~/mydir/lib`) to two environment variables.
For example: For example:
<pre> <b>export LIBRARY_PATH=$LIBRARY_PATH:~/mydir/lib</b> # For both Linux and Mac OS X <pre> <b>export LIBRARY_PATH=$LIBRARY_PATH:~/mydir/lib</b> # For both Linux and macOS X
<b>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/mydir/lib</b> # For Linux only <b>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/mydir/lib</b> # For Linux only
<b>export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/mydir/lib</b> # For Mac OS X only</pre> <b>export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/mydir/lib</b> # For macOS X only</pre>

View File

@ -5,16 +5,19 @@ well-suited to loading models created in Python and executing them within
a Go application. This guide explains how to install and set up the a Go application. This guide explains how to install and set up the
[TensorFlow Go package](https://godoc.org/github.com/tensorflow/tensorflow/tensorflow/go). [TensorFlow Go package](https://godoc.org/github.com/tensorflow/tensorflow/tensorflow/go).
**WARNING:** The TensorFlow Go API is *not* covered by the TensorFlow Warning: The TensorFlow Go API is *not* covered by the TensorFlow
[API stability guarantees](https://www.tensorflow.org/programmers_guide/version_semantics). [API stability guarantees](https://www.tensorflow.org/programmers_guide/version_semantics).
## Supported Platforms ## Supported Platforms
You may install TensorFlow for Go on the following operating systems: This guide explains how to install TensorFlow for Go. Although these
instructions might also work on other variants, we have only tested
(and we only support) these instructions on machines meeting the
following requirements:
* Linux * Linux, 64-bit, x86
* Mac OS X * macOS X, 10.11 (El Capitan) or higher
## Installation ## Installation
@ -27,7 +30,7 @@ steps to install this library and enable TensorFlow for Go:
"Determine which TensorFlow to install" in one of the following guides: "Determine which TensorFlow to install" in one of the following guides:
* @{$install_linux#determine_which_tensorflow_to_install$Installing TensorFlow on Linux} * @{$install_linux#determine_which_tensorflow_to_install$Installing TensorFlow on Linux}
* @{$install_mac#determine_which_tensorflow_to_install$Installing TensorFlow on Mac OS} * @{$install_mac#determine_which_tensorflow_to_install$Installing TensorFlow on macOS}
2. Download and extract the TensorFlow C library into `/usr/local/lib` by 2. Download and extract the TensorFlow C library into `/usr/local/lib` by
invoking the following shell commands: invoking the following shell commands:
@ -57,9 +60,9 @@ steps to install this library and enable TensorFlow for Go:
directory (for example, `~/mydir/lib`) to two environment variables directory (for example, `~/mydir/lib`) to two environment variables
as follows: as follows:
<pre> <b>export LIBRARY_PATH=$LIBRARY_PATH:~/mydir/lib</b> # For both Linux and Mac OS X <pre> <b>export LIBRARY_PATH=$LIBRARY_PATH:~/mydir/lib</b> # For both Linux and macOS X
<b>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/mydir/lib</b> # For Linux only <b>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/mydir/lib</b> # For Linux only
<b>export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/mydir/lib</b> # For Mac OS X only</pre> <b>export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/mydir/lib</b> # For macOS X only</pre>
4. Now that the TensorFlow C library is installed, invoke `go get` as follows 4. Now that the TensorFlow C library is installed, invoke `go get` as follows
to download the appropriate packages and their dependencies: to download the appropriate packages and their dependencies:

View File

@ -6,18 +6,20 @@ Java application. This guide explains how to install
[TensorFlow for Java](https://www.tensorflow.org/api_docs/java/reference/org/tensorflow/package-summary) [TensorFlow for Java](https://www.tensorflow.org/api_docs/java/reference/org/tensorflow/package-summary)
and use it in a Java application. and use it in a Java application.
**WARNING:** The TensorFlow Java API is *not* covered by the TensorFlow Warning: The TensorFlow Java API is *not* covered by the TensorFlow
[API stability guarantees](https://www.tensorflow.org/programmers_guide/version_semantics). [API stability guarantees](https://www.tensorflow.org/programmers_guide/version_semantics).
## Supported Platforms ## Supported Platforms
TensorFlow for Java is supported on the following operating systems: This guide explains how to install TensorFlow for Java. Although these
instructions might also work on other variants, we have only tested
(and we only support) these instructions on machines meeting the
following requirements:
* Linux * Ubuntu 14.04 or higher; 64-bit, x86
* Mac OS X * macOS X 10.11 (El Capitan) or higher
* Windows * Windows 7 or higher; 64-bit, x86
* Android
The installation instructions for Android are in a separate The installation instructions for Android are in a separate
[Android TensorFlow Support page](https://www.tensorflow.org/code/tensorflow/contrib/android). [Android TensorFlow Support page](https://www.tensorflow.org/code/tensorflow/contrib/android).
@ -81,14 +83,14 @@ As an example, these steps will create a Maven project that uses TensorFlow:
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
try (Graph g = new Graph()) { try (Graph g = new Graph()) {
final String value = "Hello from " + TensorFlow.version(); final String value = "Hello from " + TensorFlow.version();
// Construct the computation graph with a single operation, a constant // Construct the computation graph with a single operation, a constant
// named "MyConst" with a value "value". // named "MyConst" with a value "value".
try (Tensor t = Tensor.create(value.getBytes("UTF-8"))) { try (Tensor t = Tensor.create(value.getBytes("UTF-8"))) {
// The Java API doesn't yet include convenience functions for adding operations. // The Java API doesn't yet include convenience functions for adding operations.
g.opBuilder("Const", "MyConst").setAttr("dtype", t.dataType()).setAttr("value", t).build(); g.opBuilder("Const", "MyConst").setAttr("dtype", t.dataType()).setAttr("value", t).build();
} }
// Execute the "MyConst" operation in a Session. // Execute the "MyConst" operation in a Session.
try (Session s = new Session(g); try (Session s = new Session(g);
Tensor output = s.runner().fetch("MyConst").run().get(0)) { Tensor output = s.runner().fetch("MyConst").run().get(0)) {
@ -117,9 +119,9 @@ This section describes how to use TensorFlow using the `java` and `javac`
commands from a JDK installation. If your project uses Apache Maven, then commands from a JDK installation. If your project uses Apache Maven, then
refer to the simpler instructions above instead. refer to the simpler instructions above instead.
### Install on Linux or Mac OS ### Install on Linux or macOS
Take the following steps to install TensorFlow for Java on Linux or Mac OS: Take the following steps to install TensorFlow for Java on Linux or macOS:
1. Download 1. Download
[libtensorflow.jar](https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-1.4.0-rc0.jar), [libtensorflow.jar](https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-1.4.0-rc0.jar),
@ -130,7 +132,7 @@ Take the following steps to install TensorFlow for Java on Linux or Mac OS:
"Determine which TensorFlow to install" in one of the following guides: "Determine which TensorFlow to install" in one of the following guides:
* @{$install_linux#determine_which_tensorflow_to_install$Installing TensorFlow on Linux} * @{$install_linux#determine_which_tensorflow_to_install$Installing TensorFlow on Linux}
* @{$install_mac#determine_which_tensorflow_to_install$Installing TensorFlow on Mac OS} * @{$install_mac#determine_which_tensorflow_to_install$Installing TensorFlow on macOS}
3. Download and extract the appropriate Java Native Interface (JNI) 3. Download and extract the appropriate Java Native Interface (JNI)
file for your operating system and processor support by running the file for your operating system and processor support by running the
@ -212,7 +214,7 @@ two files are available to the JVM:
* the extracted JNI library * the extracted JNI library
For example, the following command line executes the `HelloTF` program on Linux For example, the following command line executes the `HelloTF` program on Linux
and Mac OS X: and macOS X:
<pre><b>java -cp libtensorflow-1.4.0-rc0.jar:. -Djava.library.path=./jni HelloTF</b></pre> <pre><b>java -cp libtensorflow-1.4.0-rc0.jar:. -Djava.library.path=./jni HelloTF</b></pre>

View File

@ -1,8 +1,12 @@
# Installing TensorFlow on Ubuntu # Installing TensorFlow on Ubuntu
This guide explains how to install TensorFlow on Ubuntu. These instructions This guide explains how to install TensorFlow on Ubuntu. Although these
might also work on other Linux variants, but we have only tested (and we instructions might also work on other Linux variants, we have only
only support) these instructions on Ubuntu 14.04 or higher. tested (and we only support) these instructions on machines meeting the
following requirements:
* 64-bit desktops or laptops
* Ubuntu 14.04 or higher
## Determine which TensorFlow to install ## Determine which TensorFlow to install
@ -128,12 +132,12 @@ Take the following steps to install TensorFlow with Virtualenv:
1. Install pip and virtualenv by issuing one of the following commands: 1. Install pip and virtualenv by issuing one of the following commands:
<pre>$ <b>sudo apt-get install python-pip python-dev python-virtualenv</b> # for Python 2.7 <pre>$ <b>sudo apt-get install python-pip python-dev python-virtualenv</b> # for Python 2.7
$ <b>sudo apt-get install python3-pip python3-dev python-virtualenv</b> # for Python 3.n</pre> $ <b>sudo apt-get install python3-pip python3-dev python-virtualenv</b> # for Python 3.n</pre>
2. Create a virtualenv environment by issuing one of the following commands: 2. Create a virtualenv environment by issuing one of the following commands:
<pre>$ <b>virtualenv --system-site-packages</b> <i>targetDirectory</i> # for Python 2.7 <pre>$ <b>virtualenv --system-site-packages</b> <i>targetDirectory</i> # for Python 2.7
$ <b>virtualenv --system-site-packages -p python3</b> <i>targetDirectory</i> # for Python 3.n</pre> $ <b>virtualenv --system-site-packages -p python3</b> <i>targetDirectory</i> # for Python 3.n</pre>
where <code><em>targetDirectory</em></code> specifies the top of the where <code><em>targetDirectory</em></code> specifies the top of the
virtualenv tree. Our instructions assume that virtualenv tree. Our instructions assume that
@ -144,7 +148,7 @@ Take the following steps to install TensorFlow with Virtualenv:
commands: commands:
<pre>$ <b>source ~/tensorflow/bin/activate</b> # bash, sh, ksh, or zsh <pre>$ <b>source ~/tensorflow/bin/activate</b> # bash, sh, ksh, or zsh
$ <b>source ~/tensorflow/bin/activate.csh</b> # csh or tcsh</pre> $ <b>source ~/tensorflow/bin/activate.csh</b> # csh or tcsh</pre>
The preceding <tt>source</tt> command should change your prompt The preceding <tt>source</tt> command should change your prompt
to the following: to the following:
@ -159,9 +163,9 @@ Take the following steps to install TensorFlow with Virtualenv:
virtualenv environment: virtualenv environment:
<pre>(tensorflow)$ <b>pip install --upgrade tensorflow</b> # for Python 2.7 <pre>(tensorflow)$ <b>pip install --upgrade tensorflow</b> # for Python 2.7
(tensorflow)$ <b>pip3 install --upgrade tensorflow</b> # for Python 3.n (tensorflow)$ <b>pip3 install --upgrade tensorflow</b> # for Python 3.n
(tensorflow)$ <b>pip install --upgrade tensorflow-gpu</b> # for Python 2.7 and GPU (tensorflow)$ <b>pip install --upgrade tensorflow-gpu</b> # for Python 2.7 and GPU
(tensorflow)$ <b>pip3 install --upgrade tensorflow-gpu</b> # for Python 3.n and GPU</pre> (tensorflow)$ <b>pip3 install --upgrade tensorflow-gpu</b> # for Python 3.n and GPU</pre>
If the preceding command succeeds, skip Step 6. If the preceding If the preceding command succeeds, skip Step 6. If the preceding
command fails, perform Step 6. command fails, perform Step 6.
@ -171,7 +175,7 @@ Take the following steps to install TensorFlow with Virtualenv:
by issuing a command of the following format: by issuing a command of the following format:
<pre>(tensorflow)$ <b>pip install --upgrade</b> <i>tfBinaryURL</i> # Python 2.7 <pre>(tensorflow)$ <b>pip install --upgrade</b> <i>tfBinaryURL</i> # Python 2.7
(tensorflow)$ <b>pip3 install --upgrade</b> <i>tfBinaryURL</i> # Python 3.n </pre> (tensorflow)$ <b>pip3 install --upgrade</b> <i>tfBinaryURL</i> # Python 3.n </pre>
where <code><em>tfBinaryURL</em></code> identifies the URL of the where <code><em>tfBinaryURL</em></code> identifies the URL of the
TensorFlow Python package. The appropriate value of TensorFlow Python package. The appropriate value of
@ -199,7 +203,7 @@ Note that you must activate the virtualenv environment each time you
use TensorFlow. If the virtualenv environment is not currently active, use TensorFlow. If the virtualenv environment is not currently active,
invoke one of the following commands: invoke one of the following commands:
<pre>$ <b>source ~/tensorflow/bin/activate</b> # bash, sh, ksh, or zsh <pre> $ <b>source ~/tensorflow/bin/activate</b> # bash, sh, ksh, or zsh
$ <b>source ~/tensorflow/bin/activate.csh</b> # csh or tcsh</pre> $ <b>source ~/tensorflow/bin/activate.csh</b> # csh or tcsh</pre>
When the virtualenv environment is active, you may run When the virtualenv environment is active, you may run
@ -265,9 +269,9 @@ take the following steps:
1. Install TensorFlow by invoking **one** of the following commands: 1. Install TensorFlow by invoking **one** of the following commands:
<pre>$ <b>pip install tensorflow</b> # Python 2.7; CPU support (no GPU support) <pre>$ <b>pip install tensorflow</b> # Python 2.7; CPU support (no GPU support)
$ <b>pip3 install tensorflow</b> # Python 3.n; CPU support (no GPU support) $ <b>pip3 install tensorflow</b> # Python 3.n; CPU support (no GPU support)
$ <b>pip install tensorflow-gpu</b> # Python 2.7; GPU support $ <b>pip install tensorflow-gpu</b> # Python 2.7; GPU support
$ <b>pip3 install tensorflow-gpu</b> # Python 3.n; GPU support </pre> $ <b>pip3 install tensorflow-gpu</b> # Python 3.n; GPU support </pre>
If the preceding command runs to completion, you should now If the preceding command runs to completion, you should now
[validate your installation](#ValidateYourInstallation). [validate your installation](#ValidateYourInstallation).
@ -276,7 +280,7 @@ take the following steps:
by issuing a command of the following format: by issuing a command of the following format:
<pre>$ <b>sudo pip install --upgrade</b> <i>tfBinaryURL</i> # Python 2.7 <pre>$ <b>sudo pip install --upgrade</b> <i>tfBinaryURL</i> # Python 2.7
$ <b>sudo pip3 install --upgrade</b> <i>tfBinaryURL</i> # Python 3.n </pre> $ <b>sudo pip3 install --upgrade</b> <i>tfBinaryURL</i> # Python 3.n </pre>
where <code><em>tfBinaryURL</em></code> identifies the URL of the where <code><em>tfBinaryURL</em></code> identifies the URL of the
TensorFlow Python package. The appropriate value of TensorFlow Python package. The appropriate value of

View File

@ -1,6 +1,11 @@
# Installing TensorFlow on macOS # Installing TensorFlow on macOS
This guide explains how to install TensorFlow on macOS. This guide explains how to install TensorFlow on macOS. Although these
instructions might also work on other macOS variants, we have only
tested (and we only support) these instructions on machines meeting the
following requirements:
* macOS X 10.11 (El Capitan) or higher
Note: As of version 1.2, TensorFlow no longer provides GPU support on macOS. Note: As of version 1.2, TensorFlow no longer provides GPU support on macOS.

View File

@ -2,7 +2,7 @@
This guide explains how to build TensorFlow sources into a TensorFlow This guide explains how to build TensorFlow sources into a TensorFlow
binary and how to install that TensorFlow binary. Note that we provide binary and how to install that TensorFlow binary. Note that we provide
well-tested, pre-built TensorFlow binaries for Linux, Mac, and Windows well-tested, pre-built TensorFlow binaries for Ubuntu, macOS, and Windows
systems. In addition, there are pre-built TensorFlow systems. In addition, there are pre-built TensorFlow
[docker images](https://hub.docker.com/r/tensorflow/tensorflow/). [docker images](https://hub.docker.com/r/tensorflow/tensorflow/).
So, don't build a TensorFlow binary yourself unless you are very So, don't build a TensorFlow binary yourself unless you are very
@ -10,16 +10,22 @@ comfortable building complex packages from source and dealing with
the inevitable aftermath should things not go exactly as documented. the inevitable aftermath should things not go exactly as documented.
If the last paragraph didn't scare you off, welcome. This guide explains If the last paragraph didn't scare you off, welcome. This guide explains
how to build TensorFlow on the following operating systems: how to build TensorFlow on 64-bit desktops and laptops running either of
the following operating systems:
* Ubuntu * Ubuntu
* Mac OS X * macOS X
We don't officially support building TensorFlow on Windows; however, you may try Note: Some users have successfully built and installed TensorFlow from
to build TensorFlow on Windows if you don't mind using the highly experimental sources on non-supported systems. Please remember that we do not fix
[Bazel on Windows](https://bazel.build/versions/master/docs/windows.html) issues stemming from these attempts.
or
[TensorFlow CMake build](https://github.com/tensorflow/tensorflow/tree/r0.12/tensorflow/contrib/cmake). We **do not support** building TensorFlow on Windows. That said, if you'd
like to try to build TensorFlow on Windows anyway, use either of the
following:
* [Bazel on Windows](https://bazel.build/versions/master/docs/windows.html)
* [TensorFlow CMake build](https://github.com/tensorflow/tensorflow/tree/r0.12/tensorflow/contrib/cmake)
## Determine which TensorFlow to install ## Determine which TensorFlow to install
@ -40,7 +46,7 @@ install:
software requirements described in one of the following documents: software requirements described in one of the following documents:
* @{$install_linux#NVIDIARequirements$Installing TensorFlow on Ubuntu} * @{$install_linux#NVIDIARequirements$Installing TensorFlow on Ubuntu}
* @{$install_mac#NVIDIARequirements$Installing TensorFlow on Mac OS} * @{$install_mac#NVIDIARequirements$Installing TensorFlow on macOS}
## Clone the TensorFlow repository ## Clone the TensorFlow repository
@ -70,7 +76,7 @@ issue the following command:
Next, you must prepare your environment for Next, you must prepare your environment for
[Linux](#PrepareLinux) [Linux](#PrepareLinux)
or or
[Mac OS](#PrepareMac) [macOS](#PrepareMac)
<a name="#PrepareLinux"></a> <a name="#PrepareLinux"></a>
@ -157,7 +163,7 @@ After preparing the environment, you must now
<a name="PrepareMac"></a> <a name="PrepareMac"></a>
## Prepare environment for Mac OS ## Prepare environment for macOS
Before building TensorFlow, you must install the following on your system: Before building TensorFlow, you must install the following on your system:
@ -238,8 +244,8 @@ One of the questions that `configure` will ask is as follows:
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native] Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]
</pre> </pre>
This question refers to a later phase in which you'll use bazel to This question refers to a later phase in which you'll use bazel to
[build the pip package](#build-the-pip-package). We recommend [build the pip package](#build-the-pip-package). We recommend
accepting the default (`-march=native`), which will accepting the default (`-march=native`), which will
optimize the generated code for your local machine's CPU type. However, optimize the generated code for your local machine's CPU type. However,
if you are building TensorFlow on one CPU type but will run TensorFlow on if you are building TensorFlow on one CPU type but will run TensorFlow on
@ -288,7 +294,7 @@ Please specify a list of comma-separated Cuda compute capabilities you want to b
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size. Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: <b>3.0</b> [Default is: "3.5,5.2"]: <b>3.0</b>
Do you wish to build TensorFlow with MPI support? [y/N] Do you wish to build TensorFlow with MPI support? [y/N]
MPI support will not be enabled for TensorFlow MPI support will not be enabled for TensorFlow
Configuration finished Configuration finished
</pre> </pre>

View File

@ -1,6 +1,13 @@
# Installing TensorFlow on Windows # Installing TensorFlow on Windows
This guide explains how to install TensorFlow on Windows. This guide explains how to install TensorFlow on Windows. Although these
instructions might also work on other Windows variants, we have only
tested (and we only support) these instructions on machines meeting the
following requirements:
* 64-bit, x86 desktops or laptops
* Windows 7 or later
## Determine which TensorFlow to install ## Determine which TensorFlow to install