# Third party library python-keycloak doesn't work

**URL:** <https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661>\
**Category:** 3rd Party Modules\
**Tags:** python, scripting\
**Created:** [January 31, 2025, 4:46am UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661 "2025-01-31T04:46:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos\_Verdugo](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@Marcos\_Verdugo](https://forum.inductiveautomation.com/u/Marcos_Verdugo)\
**Post date:** [January 31, 2025, 4:46am UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661/1 "2025-01-31T04:46:00Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b9ce59a289d1e59dbd55d05f14944c403281040.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/23a448d298f4494b93c05718fb7e1adf214baee9.png)

I am running Ignition 8.1.45

---

<div class="post-metadata">

**Author:** ![Jonathan\_Meredith](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@Jonathan\_Meredith](https://forum.inductiveautomation.com/u/Jonathan_Meredith)\
**Post date:** [January 31, 2025, 5:11am UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661/2 "2025-01-31T05:11:49Z")

</div>

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](https://endoflife.date/python).

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

---

<div class="post-metadata">

**Author:** ![mathieurleblanc33](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mathieurleblanc33](https://forum.inductiveautomation.com/u/mathieurleblanc33)\
**Post date:** [February 4, 2025, 4:19pm UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661/3 "2025-02-04T16:19:47Z")

</div>

[@inductiveautomation](https://forum.inductiveautomation.com/groups/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?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 4, 2025, 4:20pm UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661/4 "2025-02-04T16:20:39Z")

</div>

> [@mathieurleblanc33](#):
>
> 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)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 4, 2025, 4:52pm UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661/5 "2025-02-04T16:52:41Z")

</div>

> [@Python version 3 update?](https://forum.inductiveautomation.com/t/python-version-3-update/10106/9):
>
> I guess I can paraphrase what I said on stage at the dev panel at this year's ICC, for posterity and so I can link to this in the future: So, the question people usually ask is "When is Python 3 coming to Ignition?". But in practice, there's really two broad reasons people are actually asking that question: They've heard that Python 2.7 is deprecated/old/unmaintained/a security risk/whatever. But that doesn't apply to Ignition, for a few reasons: When folks say "Python" out in the world, the…

---

<div class="post-metadata">

**Author:** ![mathieurleblanc33](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mathieurleblanc33](https://forum.inductiveautomation.com/u/mathieurleblanc33)\
**Post date:** [February 4, 2025, 10:53pm UTC](https://forum.inductiveautomation.com/t/third-party-library-python-keycloak-doesnt-work/101661/6 "2025-02-04T22:53:27Z")

</div>

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.
