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

相关推荐
WALKING_CODE7 小时前
Anaconda安装完成后启动Jupyter报错,解决方法
ide·python·jupyter
Master_清欢20 小时前
jupyter新增行数
ide·python·jupyter
莫非王土也非王臣1 天前
TensorFlow中卷积神经网络相关函数
人工智能·cnn·tensorflow
缘友一世1 天前
PyCharm连接autodl平台服务(python解释器&jupyter lab)
python·jupyter·pycharm
weixin_462446231 天前
使用 Python 创建和导出 Jupyter Notebook:从零到一的完整教程
开发语言·python·jupyter
jarreyer1 天前
markdown转jupyter notebook记录
ide·python·jupyter
mengyoufengyu1 天前
JupyterLab4.5安装使用
python·jupyter·jupyterlab
2501_941881403 天前
高并发消息队列设计与优化策略在多语言系统中的实践分享
jupyter
爱吃羊的老虎3 天前
从零开始安装到精通的 Jupyter Notebook 完整教程
ide·python·jupyter
Autumn72993 天前
【 jupyter 】PyCharm配置服务器连接jupyter
服务器·jupyter·pycharm