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

相关推荐
翱翔的苍鹰5 小时前
多Agent智能体系统设计思路
java·python·深度学习·神经网络·机器学习·tensorflow
果粒蹬i1 天前
你的第一个神经网络:用PyTorch/Keras实现手写数字识别
pytorch·神经网络·keras
地球没有花2 天前
调整warmup的batch优化tensorflow serving P99耗时毛刺
人工智能·python·tensorflow
莫非王土也非王臣2 天前
网页端的TensorFlow开发实践
人工智能·python·tensorflow
QQ__17646198242 天前
SSH远程通过Vscode运行Jupyter无法使用CUDA
vscode·jupyter·ssh
却道天凉_好个秋3 天前
Tensorflow数据增强(一):图片的导入与显示
人工智能·python·tensorflow
技术小黑3 天前
TensorFlow学习系列03 | 实现天气识别
人工智能·cnn·tensorflow
赋创小助手3 天前
NVIDIA H100与GH200选型指南:AI与HPC负载的硬件适配方案
服务器·人工智能·深度学习·神经网络·语言模型·自然语言处理·tensorflow
UR的出不克3 天前
【Python实战】基于Flask+TensorFlow的网易云音乐数据分析系统:从数据爬取到情感分析的全流程实现
python·flask·tensorflow
Thomas21433 天前
jupyterhub on k8s jupyter总是无响应
jupyter·容器·kubernetes