emilwallner / Screenshot-to-code

A neural network that transforms a design mock-up into a static website.
Other
16.42k stars 1.56k forks source link

ModuleNotFoundError: No module named 'keras' #73

Open chrisbward opened 1 year ago

chrisbward commented 1 year ago

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?

chrisbward commented 1 year ago
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.