Jupyter notebook running error: ModuleNotFoundError: No module named'keras' solution

Continuing from the previous article
"How to configure tensorflow in win10+python3.6+tensorflow-cpu+keras+Pycharm environment"

byAnaconda Prompt turn on

View the currently available kernel

jupyter kernelspec list

display
Insert picture description here

Add Python kernel

conda activate tensorflow #tensorflow是之前创建的虚拟环境名字

In the tensorflow virtual environment, installipykernel

conda install ipykernel

Insert picture description here

python -m ipykernel install --name tensorflow

Insert picture description here

If you accidentally add a wrong Python kernel , you can delete it with this command:

jupyter kernelspec remove your_env_name

once againView the currently available kernel

jupyter kernelspec list

display
Insert picture description here

jupyter notebook

Insert picture description here

Insert picture description here
Insert picture description here
Anaconda Jupyter Notebook 添加
PyTorch / TensorFlow / Hard Python Kernel
Same method

reference

1. Anaconda Jupyter Notebook adds PyTorch/TensorFlow/Keras Python Kernel graphical instructions
2. Import keras error in jupyter notebook: ModuleNotFoundError: No module named'keras' Solution
3. How to use Python virtual environment in Jupyter Notebook?
4. Use keras in jupyter notebook

Guess you like

Origin blog.csdn.net/weixin_45656790/article/details/108875446