1楷扬、安裝VirutalEnv
sudo pip install --upgrade virtualenv
2津肛、創(chuàng)建工作目錄
virtualenv --system-site-packages -p python3 /work/code/ai/
3粗井、進(jìn)入工作目錄
source /work/code/ai/bin/activate
4唧取、安裝TensorFlow
pip install --upgrade tensorflow
5航夺、驗(yàn)證安裝情況媳叨,輸入Python命令模式
# Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
6腥光、查看輸出結(jié)果
安裝成功