Python Virtual Environment

I have a 3rd party SDK which only works with certain versions of certain packages (e.g. pandas , scikit, etc.). If outside the Ignition, I create a virtual environment, import the sdk with its dependencies and it works fine.

I am wondering, if possible at all, what is the workflow to do the same and make use of this sdk inside ignition?

Thanks for the help.

While there is somewhat limited support for importing 3rd party Python libraries, there’s nothing equivalent to what you have with virtual env.

https://docs.inductiveautomation.com/display/DOC81/Libraries#Libraries-Importing3rdPartyLibraries

Were your example dependencies just examples? If not, your 3rd party library probably won’t work at all, because you can’t use any libraries that require CPython.

1 Like

Thank you @Kevin.Herron for the reply. They are unfortunately actual dependencies (numpy, pandas, sklearn, tensorflow …).
I guess then I have to run it in parallel and exchange data with ignition somehow.

Couple of ways to do that. You can connect your external system to the same database Ignition is connected to. Or create a API that you hit from Ignition via system.net.* functions. Or inverse that and create an API in Ignition via the WebDev module that your external system hits. These I think are the easiest ways if feasible.

3 Likes