RiveraJackson
RiveraJackson

Reputation: 7

ModuleNotFoundError in importing and working with keras/tensorflow

I'm trying to start working on keras and tensorflow but I cannot figure out how to properly set them up and I keep getting errors in my jupyter notebook.

From searching for solutions online, I can tell that it's likely that my folders are misplaced and I cannot tell where I am downloading my files/packages.

All I'm trying to do is begin following udemy classes and to start messing around with keras/tensorflow, but I keep getting these errors everytime I try importing on jupyter notebook.

I'm on a Windows OS, and I suspect that the problem is due to a misplacement of either Python37 or Anaconda, but I'm not sure how to begin solving it as everything I found online isn't working.

Any idea how as to what I'm doing wrong and how could I solve this problem?

new error 1

new error 2

Upvotes: 1

Views: 832

Answers (2)

Mitiku
Mitiku

Reputation: 5412

I had the same issue once. When you start Jupyter notepad, by default it uses default anaconda environment. But if you want to switch to different environments you can use ipykernel.

source activate myenv
pip install --upgrade ipykernel
python -m ipykernel install --user --name your_conda_env --display-name "Python (myenv)"

Now when you start the jupyter you will see a list of environments(E.g Python (tensorflow-env)). enter image description here

Upvotes: 1

Aviv Moshe Albeg
Aviv Moshe Albeg

Reputation: 131

I don't know what keras.modules is... Do you mean keras.models?

from keras.models import Sequential

also Dense is from keras.layers so,

from keras.layers import Dense

Upvotes: 0

Related Questions