赞
踩
环境:
mac10.13.6
python2.7
tensorflow-1.10.1-cp27-cp27m-macosx_10_11_x86_64.whl
pip install scipy
pip install matplotlib
pip install numpy --ignore-installed numpy #若已安装则更新到最新版本
这里选择是
tensorflow-1.10.1-cp27-cp27m-macosx_10_11_x86_64.whl版本
安装:
pip install tensorflow-1.10.1-cp27-cp27m-macosx_10_11_x86_64.whl
新建hello.py
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print sess.run(hello)
sess.close()
执行:
python hello.py
打印:
hechaojiedeMacBook-Pro:python hecj$ python hello.py
2018-09-06 10:14:04.221781: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Hello, TensorFlow!
完!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。