Python Forum
It says there is no keras in jupyter notebook. it is wrong there is a keras install
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
It says there is no keras in jupyter notebook. it is wrong there is a keras install
#1
When I run the following code, I get the error shown below.

import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers
Output:
ImportError Traceback (most recent call last) <ipython-input-6-7abbf1c8e6c0> in <module> 1 import tensorflow as tf ----> 2 from tensorflow import keras 3 from tensorflow.keras import layers ImportError: cannot import name 'keras'
But keras is there as shown here:

Output:
jupyter_core 4.7.1 py38haa95532_0 jupyterlab-widgets 1.0.0 pypi_0 pypi jupyterlab_pygments 0.1.2 py_0 keras 2.4.3 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi keras-tuner 1.0.2 pypi_0 pypi kiwisolver 1.3.1 pypi_0 pypi langdetect 1.0.8 pypi_0 pypi
I am using Windows 10 home version with 64bit. The tensorflow version is 2.4.1. It still does not like this line number two.

Output:
from tensorflow import keras
How do I get rid of this error?

Any help appreciated. Thanks in advance.

Respectfully,

LZ
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What pip version should I install on Cygwin for jupyter-python39? Virgo_Concepts 2 512 Dec-03-2025, 05:01 AM
Last Post: mamta25
  I'm trying to import a dataset into a Jupyter Notebook Hisilat03 0 1,193 Mar-24-2025, 09:26 AM
Last Post: Hisilat03
  Jupyter Notebook cell ? flaviu2 6 6,270 Feb-10-2025, 09:39 AM
Last Post: mysqlguider
  import data (.csv) into Jupyter notebook oranstprotonme 2 2,102 Aug-14-2024, 07:08 PM
Last Post: oranstprotonme
  Troubleshooting Jupyter Notebook installation with Python using pip and a venv Drone4four 1 5,377 Jun-04-2024, 10:55 PM
Last Post: Drone4four
  Install python 2.7 in jupyter lab raman 28 8,532 Jun-01-2024, 01:53 PM
Last Post: snippsat
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 8,983 Nov-15-2023, 06:56 PM
Last Post: jst
  Navigating file directories and paths inside Jupyter Notebook Mark17 5 18,735 Oct-29-2023, 12:40 PM
Last Post: Mark17
  How to programmatically stop a program in Jupyter Notebook? Mark17 11 79,384 Feb-12-2023, 01:41 PM
Last Post: jp21in
Thumbs Up Python 3 Jupyter notebook ternary plot data nicholas 0 2,435 Jan-21-2023, 05:01 PM
Last Post: nicholas

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.