Robert Esteves

06/15/2022, 9:19 PM
Hi all, I'm looking for some help with the following error: Failed to load and execute flow run: ModuleNotFoundError("No module named 'pyodbc'") We are running an Ec2 instance with the Prefect Docker Agent. --How do we install the Python modules? Is it needed on the Ec2 instance, (which we did) or is there a way to load it into the container? Thanks for your assistance and support.

Kevin Kho

06/15/2022, 9:22 PM
Yes you would need it in the execution environment, so it needs to be in the container. This syntax will work as long as you use a base prefect image

Anna Geller

06/15/2022, 9:29 PM
connecting to a SQL Server DB from a Docker container can be challenging - I'd definitely recommend not starting your Dockerfile from scratch but googling a bit about how others tackled this since you need to ensure you have the DB driver and everything set up - not trivial (just a heads up to avoid your negative engineering here)

Robert Esteves

06/15/2022, 9:36 PM
Thanks Kevin, and Anna. I really appreciate your help.