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

相关推荐
Elaine3361 天前
【 基于 TensorFlow+CNN 的水果图像识别系统设计与实现】
人工智能·python·深度学习·计算机视觉·cnn·tensorflow
Java后端的Ai之路2 天前
【神经网络基础】-TensorFlow Serving官方的生产级模型部署
神经网络·部署·tensorflow·neo4j·tensorflowserv
学习是生活的调味剂2 天前
在大模型开发中,是否需要先完整学习 TensorFlow,再学 PyTorch?
pytorch·学习·tensorflow·transformers
liu****3 天前
04_Pandas数据分析入门
python·jupyter·数据挖掘·数据分析·numpy·pandas·python常用工具
larance4 天前
jupyter 服务端扩展开发
ide·python·jupyter
后端小张4 天前
【TextIn大模型加速器 + 火山引擎】TextIn大模型加速器与火山引擎协同构建智能文档处理新范式
人工智能·学习·数据挖掘·langchain·tensorflow·gpt-3·火山引擎
vvoennvv4 天前
【Python TensorFlow】 TCN-BiGRU时间序列卷积双向门控循环神经网络时序预测算法(附代码)
python·神经网络·机器学习·gru·tensorflow·tcn
手抄二进制5 天前
使用Anaconda创建python环境并链接到Jupyter
开发语言·python·jupyter
神气龙5 天前
VS Code连接wsl上Conda虚拟环境,打开Jupyter Notebook
ide·python·jupyter
Qhumaing6 天前
解决因为jupyter notebook修改路径下没有c.NotebookApp.notebook_dir而无法修改目录问题
ide·python·jupyter