Automating Python module installs is challenging for a variety of reasons:
- The pip command isn't installed by default on macOS but is the standard way to install modules
- Installing the pip command could be problematic, especially if the user has a homebrew python install
- Versioning of the required modules could be an issue
And this isn't an exhaustive list. At some point, we want to think about these issues as part of the plugin install process, but that's still a way off. Currently, the best practice is to just give the user instructions on installing pip (likely needed) then give them instructions for installing the required modules.
If the module is pure Python and the license allows redistribution, you can just include it with the plugin - just put it in the Server Plugin folder (be sure to remove .pyc files before you distribute the plugin).