Since the Edge Agent runs in a container, it’s best to think of it as an entirely separate environment. This means dependencies like minimalmodbus are not automatically available inside the container, even if you’ve installed them in the host OS.
If you’re familiar with Docker, the best solution is to build a new container that’s extended FROM the Losant Edge Agent.
So essentially you’d create a new Dockerfile that looks something like this:
FROM losant/edge-agent:1.6.1
# Install additional dependencies
# COPY python scripts to container file system
How to install the dependencies varies greatly based on your specific python environment, but there are a lot of resources available online for how to do Python and Docker together.
This Dockerfile will then allow you to build a new image that includes anything you’ve added. The Run Executable Node can then run your custom python scripts directly from the container file system.