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

相关推荐
点云SLAM37 分钟前
TensorFlow 和PyTorch的全方位对比和选择建议
人工智能·pytorch·计算机视觉·tensorflow·深度学习框架·ai部署·ai环境平台
lishaoan7740 分钟前
用TensorFlow进行逻辑回归(六)
人工智能·tensorflow·逻辑回归
九章云极AladdinEdu13 小时前
摩尔线程MUSA架构深度调优指南:从CUDA到MUSA的显存访问模式重构原则
人工智能·pytorch·深度学习·机器学习·语言模型·tensorflow·gpu算力
音程16 小时前
(已解决) 如何使用密钥连接远程服务器jupyter notebook从而在本地浏览器上打开
运维·服务器·python·jupyter
盼小辉丶1 天前
TensorFlow深度学习实战(26)——生成对抗网络详解与实现
深度学习·生成对抗网络·tensorflow
电脑能手1 天前
如何远程访问在WSL运行的Jupyter Notebook
ide·python·jupyter
lishaoan772 天前
用TensorFlow进行逻辑回归(二)
人工智能·tensorflow·逻辑回归
DAWN_T173 天前
Transforms
pytorch·python·机器学习·jupyter·pycharm
魔力之心3 天前
TensorFlow2 study notes[1]
人工智能·python·tensorflow
YZJenny3 天前
没有管理员权限,在服务器安装使用 Jupyter + R 内核
服务器·jupyter