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

相关推荐
技道两进3 小时前
使用深度神经网络进行时间序列分析之数据窗口
深度学习·tensorflow·时间序列预测·滑动窗口·数据窗口
-To be number.wan5 小时前
为什么 pyecharts 在 Jupyter Notebook 里显示空白?
ide·python·jupyter·数据分析
青春不朽51221 小时前
TensorFlow 入门指南
人工智能·python·tensorflow
Together_CZ2 天前
ultralytics.utils.export——engine.py、imx.py、tensorflow.py各模型导出子模块代码详读
tensorflow·onnx·ultralytics·utils.export·engine.py·imx.py·模型导出
AndyHeee4 天前
【windows使用TensorFlow,GPU无法识别问题汇总,含TensorFlow完整安装过程】
人工智能·windows·tensorflow
维度攻城狮5 天前
交互式机器人编程:使用Jupyter Notebook运行ROS2程序
jupyter·机器人·ros2
移幻漂流5 天前
05 - TensorFlow Lite 技术全景:轻量级机器学习推理引擎完整解析
android·人工智能·机器学习·tensorflow
却道天凉_好个秋5 天前
Tensorflow数据增强(二):基本变换操作
人工智能·python·tensorflow
爱喝可乐的老王5 天前
Jupyter Notebook 的内核切换
linux·ide·jupyter
GatiArt雷5 天前
TensorFlow Lite在STM32嵌入式设备中的AI图像识别实战
人工智能·stm32·tensorflow