环境:macOS 10.14
python系统自带2.7以及自己安装的3.7
安装anaconda
在官网下载,按照步骤操作即可,下载地址
安装Tensorflow
- 建立一个 conda 计算环境,命令行输入:
$ conda create -n tensorflow python=3.7
- 激活tensorflow环境
$ source activate tensorflow
- 安装
$ pip install tensorflow
- 终端测试:
$ python3 >>>import tensorflow >>>print(tf.__version__