Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf view fails to load with PIL error #16

Open
bnlawrence opened this issue Apr 17, 2024 · 0 comments
Open

cf view fails to load with PIL error #16

bnlawrence opened this issue Apr 17, 2024 · 0 comments

Comments

@bnlawrence
Copy link
Collaborator

Recent install of cf-view in a docker container fails with:

from PIL.ImageQt import ImageQt
ImportError: cannot import name 'ImageQt' from 'PIL.ImageQt' (/opt/conda/envs/datatools/lib/python3.12/site-packages/PIL/ImageQt.py). Did you mean: 'Image'?

The Dockerfile for reproduction is:

FROM condaforge/mambaforge

#Update and install extra tools.
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install qt5-default graphviz plantuml

#mamba update and emsvaltool
RUN mamba update -y conda mamba pip && mamba create -y --name datatools 

#set conda env
SHELL ["conda", "run", "--name", "datatools", "/bin/bash", "--login", "-c"]

#cf-python and other tools
RUN mamba install -c conda-forge cf-python cf-plot ipython gcc gfortran gdb make cmake libtool && conda clean --all -y
RUN pip install cf-view #Not yet in conda

#nuke dash
RUN rm /bin/sh&&ln -s /bin/bash /bin/sh

ENV PYTHONNOUSERSITE=1

RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc&&echo "conda activate datatools" >> ~/.bashrc

Which is then run with: docker run -e DISPLAY=host.docker.internal:0 -it ncas/dtools24:v1 and within the container: cfview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant