emilwallner/Screenshot-to-code

ModuleNotFoundError: No module named 'keras'

chrisbward opened this issue · 1 comments

cloned the repo, jumped to the root directory, then;

python3 -m venv venv
source venv/bin/activate
pip install keras tensorflow pillow h5py jupyter
jupyter notebook

Opened the notebook, went to hello-world example, ran the first code block;

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In [1], line 1
----> 1 from keras.layers import Embedding, TimeDistributed, RepeatVector, LSTM, concatenate , Input, Reshape, Dense
      2 from keras.preprocessing.image import array_to_img, img_to_array, load_img
      3 import numpy as np

ModuleNotFoundError: No module named 'keras'

What's up with that?

which jupyter
/home/user/miniconda3/bin/jupyter

determined that it wasn't respecting the venv virtual environment
So I then did the following;

pip3 install ipykernel
ipython kernel install --user --name=venv

Ran the notebook server, changed kernel and still no joy.

Python is FUN.