1 建立一个 conda 计算环境
Create a conda environment called tensorflow:
conda create -n tensorflow python=2.7
2 激活环境,使用 conda 安装 TensorFlow
Activate the environment and use pip to install TensorFlow inside it.
source activate tensorflow
Ubuntu安装tensorflow先安装python-dev,再安装tensorflow就好了$ sudo apt-get install python-dev