# Python3 Scripts on Ignition

**URL:** <https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028>\
**Category:** Ignition\
**Tags:** ignition80, scripting\
**Created:** [April 18, 2020, 4:30pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028 "2020-04-18T16:30:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbrinneman](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fbrinneman](https://forum.inductiveautomation.com/u/fbrinneman)\
**Post date:** [April 18, 2020, 4:30pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/1 "2020-04-18T16:30:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ott.andrew33](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ott.andrew33/32/44625_2.png) [@ott.andrew33](https://forum.inductiveautomation.com/u/ott.andrew33)\
**Post date:** [April 18, 2020, 6:38pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/2 "2020-04-18T18:38:34Z")

</div>

Is this what you are looking for?

**Ignition 8 User Manual** ([https://docs.inductiveautomation.com/display/DOC80/Libraries](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.

---

<div class="post-metadata">

**Author:** ![fbrinneman](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fbrinneman](https://forum.inductiveautomation.com/u/fbrinneman)\
**Post date:** [April 18, 2020, 6:45pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/3 "2020-04-18T18:45:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 18, 2020, 7:16pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/4 "2020-04-18T19:16:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fbrinneman](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fbrinneman](https://forum.inductiveautomation.com/u/fbrinneman)\
**Post date:** [April 18, 2020, 9:00pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/5 "2020-04-18T21:00:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fbrinneman](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fbrinneman](https://forum.inductiveautomation.com/u/fbrinneman)\
**Post date:** [April 18, 2020, 9:04pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/6 "2020-04-18T21:04:13Z")

</div>

Thank you for the response, by the way!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 18, 2020, 9:10pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/7 "2020-04-18T21:10:48Z")

</div>

> [@fbrinneman](#):
>
> But I can always run APIs on ignition, correct? It has that capability?

I'm not sure what you mean by this.

---

<div class="post-metadata">

**Author:** ![jchancey7175](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jchancey7175](https://forum.inductiveautomation.com/u/jchancey7175)\
**Post date:** [February 13, 2021, 2:41pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/8 "2021-02-13T14:41:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2021, 2:47pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/9 "2021-02-13T14:47:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jchancey7175](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jchancey7175](https://forum.inductiveautomation.com/u/jchancey7175)\
**Post date:** [February 14, 2021, 6:13pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/10 "2021-02-14T18:13:58Z")

</div>

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

---

<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 14, 2021, 6:34pm UTC](https://forum.inductiveautomation.com/t/python3-scripts-on-ignition/34028/11 "2021-02-14T18:34:26Z")

</div>

Some relevant commentary:

> [@Python2.0vsPython3.0](http://forum.inductiveautomation.com/t/python2-0vspython3-0/28237/3):
>
> Also, the two biggest problems (IMNSHO) with Python 2.x don’t apply to Jython: Python2 plays fast and loose with character encodings, with strings implemented with 8-bit bytes. Python2 uses byte arrays as strings and vice versa throughout the implementation, with much associated grief for file and pipe access when trying to handle internationalization. Python3 separates byte arrays from strings throughout. Jython’s strings are Java strings, which are implemented with 16-bit short integer c…
