Hi,
I'm running a PyFlink 1.13.1 cluster in Docker. The pyflink-walkthrough example 
from the Apache Flink Playgrounds repo (flink-playgrounds - Git at Google) 
works fine.

However, I'm unable to add a Python package dependency, like "python-dotenv" to 
the Python job. I've tried the suggested techniques for specifying dependencies 
in a requirements file as described in Dependency Management (i.e., 
--pyRequirements or using t_env.set_python_requirements) but they seem to have 
no effect.
For example, in my Dockerfile I copy my requirements.txt file into the 
jobmanager host at /opt/flink/requirements.txt like so:RUN echo 
"python-dotenv==0.19.2" >> /opt/flink/requirements.txtI've verified its 
contents inside the jobmanager container.
And then from my client machine I submit the job like this into my docker-based 
cluster:docker-compose exec jobmanager ./bin/flink run -py 
/opt/pyflink-walkthrough/payment_msg_proccessing.py -d --pyRequirements 
/opt/flink/requirements.txt 
However, all attempts result in the job producing the error: 
ModuleNotFoundError: No module named 'dotenv' 
I'm wondering if the technique I'm using works for Python jobs or only for 
Python UDFs?
Help would be appreciated.

Reply via email to