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 天前
Jupyter Notebook操作指南(1)
ide·python·学习·jupyter
Neverfadeaway3 天前
Jupyter Notebook 介绍、安装及使用
jupyter·markdown·ipython·jupyter详解·jupyter快捷键
盼小辉丶5 天前
DenseNet详解与实现
深度学习·keras·tensorflow2
guidovans5 天前
Crawl4AI精准提取结构化数据
人工智能·python·tensorflow
996终结者6 天前
同类软件对比(四):Jupyter vs PyCharm vs VS Code:Python开发工具终极选择指南
vscode·python·jupyter·pycharm·visual studio code
虚拟现实旅人6 天前
【机器学习】通过tensorflow实现猫狗识别的深度学习进阶之路
深度学习·机器学习·tensorflow
Teletele-Lin7 天前
Miniconda安装与VSCode搭建远程Python、Jupyter开发环境
vscode·python·jupyter·环境配置·远程开发
GEO_YScsn7 天前
Vite:Next-Gen Frontend Tooling 的高效之道——从原理到实践的性能革命
前端·javascript·css·tensorflow
A尘埃7 天前
TensorFlow 和 PyTorch两大深度学习框架训练数据,并协作一个电商推荐系统
pytorch·深度学习·tensorflow
里昆7 天前
【AI】Tensorflow在jupyterlab中运行要注意的问题
人工智能·python·tensorflow