There’s actually a procedure you can use to use pip
from within Jython to install packages, then link Ignition’s Jython lib to an-off-the-shelf Jython lib and use that…however, the article specifically calls out the twilio
module as not working, because one of its dependencies, cffi
, has C dependencies (IE, won’t work in Jython).
For posterity, here’s the procedure, copied verbatim from an internal document:
0) On the server, install Java 8 if you haven’t already.
- Download the full Jython 2.7.1 installer, and install. I installed to c:\jython2.7.1 for simplicity. Keep all other options default. Link: http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar
- Make sure JAVA_HOME points to the jre directory (tested with 8u191). If it’s not there, add the environment variable.
- Open a CMD prompt in admin mode. (Not PowerShell) “cd” to the /bin
- run “jython -m ensurepip” to install pip and setuptools
- Shut down Ignition if it’s already running
- In the CMD prompt, “cd” to the Ignition/user-lib/pylib folder
- Delete the “site-packages” folder
- Create a Junction link to the Jython site-packages directory: “mklink /J site-packages c:\jython2.7.1\Lib\site-packages”