Procedure for installing python libraries from source

Uhm, gateway events run in the gateway service, not in your workstation.

2 Likes

How did you figure it out? ( I'm genuinely curious about it )
The official link says that the packages are 100% pure python and that is also usable with Jython
https://pyserial.readthedocs.io/en/latest/pyserial.html

Cheers,
Cristian

That it uses DLLs isn’t quite accurate. It uses platform-specific modules like win32 and ctypes, which aren’t fully implemented in Jython.

It does mention that it “works on Jython” with the caveat that you have a JavaComm implementation on the ClassPath, which is basically saying “BYO serial implementation that conforms to this API”, but you don’t have that and the JavaComm API is old, crusty, and deprecated.

This probably deserves a separate topic if further discussion is necessary.

1 Like

Hey @PGriffith, are there similar instructions to follow with the Gateway running in Linux?

The instructions would be essentially the same, just with commands like ln instead of mklink.

If you’re in to transport protocols, here’s a two-liner for POSIX that you can use to get the libraries listed below:

git clone https://github.com/barbinbrad/ignition-jython-modules
rsync -r --exclude '.git' ignition-jython-modules/. /usr/local/ignition/user-lib/pylib

Note: There’s no security problems here, but you don’t know me, so it’s good to assume that there are. The better approach is to build your own jython modules instead of using trusting anyone. This is just an example of how you might do something similar.