jupyter notebook上完美运行tensorflow、keras

   日期:2020-10-07     浏览:165    评论:0    
核心提示:jupyter中使用TensorFlow 在激活TensorFlow之后安装ipython和jupyterTensorflow的安装见之前发的 win10+python3.6+tensorflow-cpu+keras+Pycharm环境下的tensorflow配置方法接win10+python3.6+tensorflow-cpu+keras+Pycharm环境下的tensorflow配置方法(tensorflow) C:\Users\Administrator>pythonPython 3.

jupyter中使用TensorFlow 在激活TensorFlow之后安装ipython和jupyter
Tensorflow的安装见之前发的 win10+python3.6+tensorflow-cpu+keras+Pycharm环境下的tensorflow配置方法

接win10+python3.6+tensorflow-cpu+keras+Pycharm环境下的tensorflow配置方法

(tensorflow) C:\Users\Administrator>python
Python 3.6.11  [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using TensorFlow backend.
>>>quit()

(tensorflow) C:\Users\Administrator>

安装测试完keras之后,先用quit()退出python代码编辑,在tensorflow环境下,输入如下命令:

conda install ipython

(tensorflow) C:\Users\Administrator>conda install ipython

conda install jupyter

(tensorflow) C:\Users\Administrator>conda install jupyter

ipython kernelspec install-self --user
这里需要注意user前面是两个–

(tensorflow) C:\Users\Administrator>ipython kernelspec install-self --user
[TerminalIPythonApp] WARNING | Subcommand `ipython kernelspec` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter kernelspec` in the future
[InstallNativeKernelSpec] WARNING | `jupyter kernelspec install-self` is DEPRECATED as of 4.0. You probably want `ipython kernel install` to install the IPython kernelspec.
[InstallNativeKernelSpec] Installed kernelspec python3 in C:\Users\Administrator\AppData\Roaming\jupyter\kernels\python3

打开Jupyter notebook,运行

import tensorflow as tf
import keras

没报错,代表成功!!!

参考
使用anaconda安装tensorflow,并在Jupyter Notebook使用

 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服