2017年10月20日 星期五

[installation, tensorflow] How to install TensorFlow using Anaconda

How to Install TensorFlow using Anaconda
井民全, Jing, mqjing@gmail.com

Google doc: This Document
Back to the Main Page








Note

Only the CPU version of TensorFlow is available at the moment.

Download Package


Install Anaconda

Command
./Anaconda3-4.4.0-Linux-x86_64.sh

Open another Terminal
Ctrl + T

Install TensorFlow

Create a tensorflow environment

Command
conda create -n tensorflow python=3.5
E.g.

Activate an Environment

Command
source activate tensorflow

E.g.

Install Tensorflow

Command
conda install -c conda-forge tensorflow

E.g.

Install iPython

Command
conda install ipython

E.g.

Verification

$ python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
Show
Hello, TensorFlow!
E.g.


Jupyter Notebook

Run

Command

source activate tensorflow
python -m pip install ipykernel
python -m ipykernel install --user --name tensorflow --display-name "tensorflow"

conda install numpy
conda install matplotlib

jupyter notebook
Fig. Startup jupyter notebook.

Fig. The web client.


Reference