ubuntu16.04下jupyter notebook如何配置使用tensorflow

前提:你的ubuntu系统已经安装anaconda,且在anaconda下已经配置了tensorflow,则接下来在终端命令行打开jupyter notebook(因为安装anaconda时已经安装了jupyter notebook)

1.**tensorflow环境

source activate tensorflow
  • 终端运行上述命令显示如下: 

ubuntu16.04下jupyter notebook如何配置使用tensorflow

2.配置jupyter notebook

jupyter notebook
  • 终端运行上述命令: 

 ubuntu16.04下jupyter notebook如何配置使用tensorflow

  • 打开了jupyter notebook

ubuntu16.04下jupyter notebook如何配置使用tensorflow 

  •  创建ipynb文件,导入tensorflow模块

ubuntu16.04下jupyter notebook如何配置使用tensorflow

  • 点击运行,若不报错,说明jupyter notebook已经配置成功,可以正常使用,若出现如下错误

ubuntu16.04下jupyter notebook如何配置使用tensorflow 

  • 则最简单的一种方法就是在anaconda下重新安装jupyter notebook
source activate tensorflow  #**tensorflow环境
conda install ipython
conda install jupyter
jupyter notebook  #重新打开jupyter notebook
  • 测试,可正常载入tensorflow模块 

 ubuntu16.04下jupyter notebook如何配置使用tensorflow