

Once the Jupyter Notebook is open, import keras and Voila! You may get a message like below in Anaconda. So, when I clicked on Jupyter Notebook, it took some time to install first, and then it opened. For me, it is keras_env.įinally, you are all set to open the Jupyter Notebook. Now, go back home and check if the “Applications on” is set to the new environment. It should have also installed tensorflow. It should be right there if everything goes well. Now, search for the library Keras in the new environment. The new environment created above should be there. Once the installation is complete, open Anaconda Environments. To install keras, we need to type the below command: conda install -c anaconda kerasĪfter analyzing, it will show a list of packages to be installed and will ask for a confirmation to proceed. conda activate keras_env Step 3: Install keras

Now, activate the environment created above. conda create -name keras_env Step 2: Activate the environment I have named my environment “ keras_env“. Open the terminal and create a new environment. So, I did a couple of search in google and tried the below suggestions: conda update wraptīut finally, I got a solution which actually worked and it is simple! Stay tuned! A Working Solution: I tried uninstalling and then re-installing and keep on getting some error or another. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. Guess what? I got another error:ĮRROR: Cannot uninstall ‘wrapt’.

So, what I did next is to try installing tensorflow as per the error message. Install TensorFlow via `pip install tensorflow` ImportError: Keras requires TensorFlow 2.2 or higher. When I tried to import keras in my Jupyter Notebook, I got the below error: pip install kerasīut, it did not actually work.

So, first I did what I usually do to install any library. Just a disclaimer I work on Mac OSx Sierra(10.12.6) and this post is all about installing Keras and importing keras in Jupyter Notebook. The next day, I again started with a different approach and it clicked! I struggled for a few hours and could not get a breakthrough and gave up that day. Do you work in Jupyter Notebooks and have an issue in installing and hence importing Keras? Well, you are at the right place.
