Skip to content

Instantly share code, notes, and snippets.

@vincgao
Last active January 10, 2018 06:05
Show Gist options
  • Save vincgao/861db2e5f2218e91c954c3798ba5d623 to your computer and use it in GitHub Desktop.
Save vincgao/861db2e5f2218e91c954c3798ba5d623 to your computer and use it in GitHub Desktop.
TensorFlow 环境搭建流程

TensorFlow 环境搭建流程

  1. 安装 Python,推荐安装 2.7 版本

官方链接 https://www.python.org/

安装教程 安装Python

  1. 安装 Anaconda,推荐安装 2.7 版本

官方下载 https://www.anaconda.com/download/

网盘链接 https://pan.baidu.com/s/1i65aD17

  1. 为 Anaconda 配置国内镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
  1. 使用 Anaconda 安装 TensorFlow
conda install tensorflow
  1. 安装 Jupyter Notebook
conda install jupyter notebook
  1. 新建一个 ipynb 文件,用一段小代码输出 TensorFlow 版本来验证安装是否成功
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np

tf.logging.set_verbosity(tf.logging.INFO)

# 输出TensorFlow版本
print(tf.__version__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment