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

相关推荐
Jay Kay16 小时前
TensorFlow源码深度阅读指南
人工智能·python·tensorflow
IAM四十二11 天前
Google 端侧 AI 框架 LiteRT 初探
android·深度学习·tensorflow
Brilliant Nemo12 天前
web布局02
前端·人工智能·tensorflow
聚客AI12 天前
GPU利用率90%的秘诀:PyTorch/TensorFlow高阶优化技巧
人工智能·pytorch·tensorflow
小张在编程13 天前
Python 深度学习基础:TensorFlow 入门——从张量到神经网络的实战指南
python·深度学习·tensorflow
boooo_hhh15 天前
第32周———Tensorflow|LSTM-火灾温度预测
人工智能·tensorflow·lstm
weixin_4640780715 天前
Pycharm中Jupyter Notebook 插件常用快捷键
ide·jupyter·pycharm
逆羽飘扬15 天前
【JupyterLab集成】GPU性能监控可视化组件
人工智能·python·jupyter·gpu监控
微信公众号:AI创造财富15 天前
Pyenv 跟 Conda 还有 Poetry 有什么区别?各有什么不同?
人工智能·python·conda·tensorflow
The丶Star16 天前
【解决CMD命令行下无法正常打开jupyter notebook的特殊办法(关闭防火墙版)】
ide·python·jupyter