Python3 Scripts on Ignition

Is there any way to run a python script with external libraries such as matplot, tensorflow and keras in Ignition?

Is this what you are looking for?

Ignition 8 User Manual (https://docs.inductiveautomation.com/display/DOC80/Libraries):

Importing 3rd Party Libraries

In addition to the standard libraries, 3rd party libraries can also be imported into Ignition’s scripting environment. A Python Library or individual module file will consist of a python file (.py) that contains the code that implements the functions of the library. You can often find python libraries built by other users on the web, or can even create your own. These files can then be placed into a folder within your Ignition server.

  • Windows folder : C:\Program Files\Inductive Automation\Ignition\user-lib\pylib
  • Linux folder : /var/lib/ignition/user-lib/pylib
  • Mac OS X folder : /usr/local/ignition/user-lib/pylib

Once the python file is in that folder, you can then import the library into a script just like any of the standard libraries.

Yes, that is exactly what I am looking for, thank you!

1 Like

You are limited to 3rd party libraries that are Python 2.7 compatible and do not use CPython or native code… which rules out many of the libraries you listed as examples.

Yikes.
But I can always run APIs on ignition, correct? It has that capability?

Thank you for the response, by the way!

I'm not sure what you mean by this.

Are there plans on upgrading to Python 3? If yes…will it be a major revision upgrade?

No there aren’t any plans.

If Jython 3 ever even sees a release we might start thinking about how an upgrade could happen while preserving backwards compatibility but this isn’t something we consider a priority right now.

Well…Python 2 to 3 wasn’t that big of an upgrade. Some syntax…

Some relevant commentary: