I installed the python-keycloak library in my host PC using "pip install python-keycloak", I made my tests outside ignition and everything works fine. Once I tested everything I tried to do it inside Ignition scripting. I downloaded the files from the library and pasted the folder under ...user-lib/pylib.
I copy and pasted my previously tested code on a scripting action by a button. I tried to execute the script by I always have an error. Is there any way of importing a third party library from python into ignition and that it actually works just as it does outside ignition?
I am running Ignition 8.1.45
From the python-keycloak page.
Python version support
We only support Python versions that have active or security support by the Python Software Foundation. You can find the list of active Python versions here.
This means that it uses python 3. Ignition is limited to Jython (not Cpython like normal python 3) which is a Java based implementation of python 2.7
6 Likes
@inductiveautomation , is there any plans to have an updated Jython version implemented in Ignition? Which would be a java based implementation of Python 3.x?
Jython 3 doesn't yet exist. Even if it did, it would not be able to load the C-library based extension modules that are so popular in CPython. (like numpy)
1 Like
Thank you!
Your write-up answered my questions I had. Very complete answer and I am satisfied with the reasons. I can now share this thread when I am asked about this subject.
1 Like