Page 1 of 1

Installing Python Modules

PostPosted: Fri Jun 09, 2017 6:53 pm
by bkmar1192
Is there a recommended or best practice approach to installing python modules that are required for a plugin.

My plugins use PIL and right now a users needs to manually install it. I'd like to automate that process if possible.


Sent from my iPhone using Tapatalk

Re: Installing Python Modules

PostPosted: Fri Jun 09, 2017 9:51 pm
by jay (support)
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).