Python入门(一)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_37486501/article/details/82731014

mac上安装python3

前提电脑安装完homebrew
1.安装python
终端输入:

brew install python3

2.安装python解释器
在命令行下输入:

python

启动CPython解释器.
3.验证是否安装成功
在命令行下输入:

# Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

若输出以下内容: Hello, TensorFlow!
则可以开始写 TensorFlow 程序了.
4.退出CPython解释器

exit()

猜你喜欢

转载自blog.csdn.net/qq_37486501/article/details/82731014