Question
· Feb 5

WSGI/Flask app with iris container complains about flask not installed

Hello,

When setting up a new web app in iris (iris is in a container) iris complains that a WSGI framework is not installed. I have installed python into the container as well as both flask and django via the python virtual environment (see second screenshot) and the python language server is running

Is this the wrong way to install flask? How do I get the container version to recoginize that flask is installed?

Product version: IRIS 2024.3
Discussion (2)1
Log in or sign up to continue

The problem is that when you try to install the flask app you get the screenshot (1st) that says it cannot find a WSGI runtime (like flask or django).

The answer is, for a container, you need to install the flask runtime in the OS level not the virtual environment level.

Example would be like this (In the Dockerfile) to install the flask runtime during a container build. This will install the runtime correctly and you will not get the WSGI message when trying to create an application.
 

RUN apt install -y python3-flask
RUN apt install -y python3-django