One, Python installation
CentOS comes with python2.7.5, this step can be omitted.
Second, Python-pip
Pip--python index package, lifetimes Linux yum, installs the Management Python software pack.
Yum Install Python-pip python-devel
Third, installation TensorFlow
Installing Linux and python2.7-based TensorFlow 0.9
Pip Install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_ X86_64.WHL
Other operating system versions can refer to the following table:
# Ubuntu/linux --bit, CPU only, Python2.7Export 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, Python2.7# Requires CUDA Toolkit7.5and 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, Python2.7: Export Tf_binary_url=https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/TENSORFLOW-0.9.0-PY2-NONE-ANY.WHL# Ubuntu/linux --bit, CPU only, Python3.4Export 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, Python3.4# Requires CUDA Toolkit7.5and 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, Python3.5Export 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, Python3.5# Requires CUDA Toolkit7.5and 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, Python3.4Or3.5: Export Tf_binary_url=https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/TENSORFLOW-0.9.0-PY3-NONE-ANY.WHL
Iv. Test Installation Success
Writing a Python script test.py
Import= tf.constant ('hello,tensorflow! ' = TF. Session ()print= tf.constant (Ten= tf.constant (+)print( Sess.run (A + b))
The results of running Python test.py are as follows:
Done.
Reference: http://blog.csdn.net/chuchus/article/details/51713389
Installing TensorFlow (CentOS) under Linux