python 环境
1. pyenv 管控python版本
brew install pyenv
2. 查看可安装的python版本
pyenv install --list
其中包含经常使用的2.7 及 3.6
3. 安装anaconda版本
Anaconda是一个用于科学计算的Python发行版,支持 Linux, Mac, Windows系统,提供了包管理与环境管理的功能,可以很方便地解决多版本python并存、切换以及各种第三方包安装问题。Anaconda利用工具/命令conda
来进行package和environment的管理,并且已经包含了Python和相关的配套工具。
pyenv install anaconda3-5.0.1
配置PyCharm
Configure-->Preferences

Project Interpreter

底部绿色圆圈是安装tensorflow的入口
tensorflow

执行hello world
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

网友评论