-
Notifications
You must be signed in to change notification settings - Fork 212
ModuleNotFoundError with lightning-flash[image] and ImageEmbedder #1532
Comments
check this file
If any of the above is False, then it throws this error. In my case |
Thank you @Rusteam ! It turned out that Unfortunately I still can't import flash because of another issue, but it should be a one-line change. I will fork the repo and see if I can resolve it :) |
Also have this problem |
It turns out that pystiche requires torch 1.12 and torchvision 0.13. Perhaps consider using poetry to manage the dependencies? It also has a pre-commit hook to export a requirements.txt file on every commit. |
I am not sure if I understand what you mean... can you elaborate? |
thanks for your reply! I guess what would be helpful is when the dependencies are pinned to specific versions. poetry is a tool which can help with that. https://python-poetry.org/ |
That would work for end applications or server app, but for frameworks like this one it would restrict what other packages can be used with... |
ok, I can reproduce this same issue also with master as well as 0.8.2 |
馃悰 Bug
After running
pip install 'lightning-flash[image]'
, when I try to create anImageEmbedder
, I get:ModuleNotFoundError: Required dependencies not available. Please run: pip install 'lightning-flash[image]'
Background:
lightning-flash[image]
into a docker container built on the jupyter base-notebook container, to minimise what else is installed.lightning-flash
is tagged as supporting python 3.7, 3.8, 3.9.To Reproduce
1. Create this Dockerfile:
2. Build the container and save the build logs
docker build --no-cache --progress=plain -t flash:latest . &> build.log
Build log file is attached, looks fine to me.
build.log
3. Run the container and create a notebook
I run as root, and mount the notebooks folder to save my work:
docker run -it -v $(PWD)/notebooks:/home/jovyan/work --user root -e GRANT_SUDO=yes -p 8888:8888 flash:latest
Navigate to http://127.0.0.1:8888/lab/tree/work/ in the browser and enter the token. Create a notebook.
4. Run the following code from the embeddings tutorial:
This produces the following error:
Expected behavior
After installing
lightning-flash[image]
I should not get an error message telling me to installlightning-flash[image]
. I should be able to instantiate anImageEmbedder
.Environment
The text was updated successfully, but these errors were encountered: