1)terminal
2)依次执行如下代码
conda create -n tensorflow python=3.5
source activate tensorflow
conda install pandas matplotlib jupyter notebook scipy scikit-learn
conda install -c conda-forge tensorflow
退出该环境时“source deactivate tensorflow”
3)验证是否安装好? terminal——jupyter notebook
import tensorflow as tf
# Create TensorFlow object called tensor
hello_constant = tf.constant('Hello World!')
with tf.Session() as sess:
# Run the tf.constant operation in the session
output = sess.run(hello_constant)
print(output)
若输出 b'Hello World!' 即为安装成功!