Install tensor flow on Linux

I am trying to install Tensorflow on Linux. Unfortunately, I can barely use Ubuntu.

I followed the page https://www.tensorflow.org/versions/master/get_started/os_setup.html#create-the-pip-package-and-install "

and I'm stuck in the "Create a package and install a package" part. When I typed " bazel build -c opt //tensorflow/tools/pip_package:build_pip_package", the terminal gives me below

No command 'bazel' found, did you mean:
 Command 'babel' from package 'openbabel' (universe)
 Command 'babel' from package 'babel-1.4.0' (universe)
bazel: command not found

What is wrong with him?

+4
source share
6 answers

You need to install "Bazel", the google homegrown build tool for building sources. You can get it here: Installing Bazel

, ?

, pip , :

# Ubuntu/Linux 64-bit, CPU only:
$ sudo pip install --upgrade   https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl

# Ubuntu/Linux 64-bit, GPU enabled:
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
+7

. , :

export PATH="$PATH:$HOME/bin"
+5

bash script, Ubuntu TensorFlow. :

https://github.com/jasonmayes/Tensor-Flow-on-Google-Compute-Engine

script , , : -)

wget https://github.com/bazelbuild/bazel/releases/download/0.1.5/bazel-0.1.5-installer-linux-x86_64.sh -O bazel-0.1.5-installer-linux-x86_64.sh
chmod +x bazel-0.1.5-installer-linux-x86_64.sh
sudo ./bazel-0.1.5-installer-linux-x86_64.sh --user
rm bazel-0.1.5-installer-linux-x86_64.sh
sudo chown $USER:$USER ~/.cache/bazel/
+1

tensorflow "pip install" , . . bazel, shadoworflow .

0

:

# 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
Install TensorFlow:

# Python 2
$ sudo pip install --upgrade $TF_BINARY_URL

# Python 3
$ sudo pip3 install --upgrade $TF_BINARY_URL

:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md

0

​​ , . , pip, :

sudo apt-get install python-pip python-dev

Tensorflow . , Nvidia. Nvidia, , .

-

  • export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl

    This sets the URL where the binaries are located. It changes from time to time, so make sure you use the appropriate URL. Then run -

  • sudo pip installβ€Š--upgrade $TF_BINARY_URL

0
source

All Articles