Tensorflow和Keras安装流程,jupyter无法使用keras解决方案

Tensorflow和Keras安装流程,jupyter无法使用keras解决方案

1.Base: anaconda https://www.anaconda.com/download

2.安装python=3.8,Tensorflow=2.13.0,Keras=2.13.1

--创建conda环境-在Anaconda Prompt中输入命令, conda create -n tensorflow python=3.8

--激活环境 activate tensorflow

--安装Tensorflow pip install tensorflow==2.13.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

--安装Keras pip install keras==2.13.1 -i https://pypi.tuna.tsinghua.edu.cn/simple

--在tensorflow环境中,进入python,输入import tensorflow 和 import keras测试

3.打开jupyter notebook,运行import keras会报错:'No module name tensorflow' ,jupyter notebook内核没有切换环境。

在Anaconda Prompt中操作:

--安装ipython conda install ipython

--安装jupyter conda install jupyter

--查看可用kernel:jupyter kernelspec list

--在tensorflow虚拟环境下,安装ipykernel: conda install ipykernel

python -m ipykernel install --name tensorflow

运行jupyter notebook:jupyter notebook

Success!

tensorflow、python版本对应关系 https://tensorflow.google.cn/install/source?hl=en#cpu

相关推荐
leoZ23115 小时前
AI+前端提效-12 AI辅助前端性能优化与监控:从开发到线上全流程提效
前端·人工智能·神经网络·自然语言处理·性能优化·keras·知识图谱
cndes3 天前
安装Miniconda+Jupyter notebook
ide·python·jupyter
典典分享指南3 天前
用大模型把写作 SOP 变成可复用 Prompt
docker·jupyter·eclipse·phpstorm·myeclipse
CIO_Alliance9 天前
AI深度系列(1)|神经元激活函数与MLP原理:理解神经网络的基础
人工智能·深度学习·神经网络·机器学习·tensorflow·ai+ipaas·企业cio联盟
老郑聊AI业财智造9 天前
TensorFlow 技术架构与源码分析
人工智能·python·深度学习·架构·tensorflow·软件工程
JTaoX11 天前
pycharm 集成本地 jupyter notebook
ide·jupyter·pycharm
CarIise11 天前
CSS选择器与样式关联
前端·css·tensorflow
晨曦花锦13 天前
从零搭建 Jupyter Notebook 远程开发环境
python·jupyter
现代野蛮人14 天前
【深度学习实验】—— 利用 RNN 模型进行心脏病预测
pytorch·python·tensorflow·ml
小小尚@21 天前
AE脚本-AE Actions v1.1.8 操作动作记录器
开发语言·前端·javascript·jupyter·postman