# Add python modules

**URL:** <https://forum.inductiveautomation.com/t/add-python-modules/49337>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [July 29, 2021, 7:14am UTC](https://forum.inductiveautomation.com/t/add-python-modules/49337 "2021-07-29T07:14:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Corentin.appart](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Corentin.appart](https://forum.inductiveautomation.com/u/Corentin.appart)\
**Post date:** [July 29, 2021, 7:14am UTC](https://forum.inductiveautomation.com/t/add-python-modules/49337/1 "2021-07-29T07:14:05Z")

</div>

Hello all,

Is it possible to add python modules ? i need to add modules to create a project and i don’t find the way for adding this.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 29, 2021, 9:03am UTC](https://forum.inductiveautomation.com/t/add-python-modules/49337/2 "2021-07-29T09:03:04Z")

</div>

You can import pure Python libraries or Jython libraries, but you can’t import a libraries with C dependencies. You can add them into the ignition directory under C:\Program Files\Inductive Automation\Ignition\user-lib\pylib

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 29, 2021, 12:06pm UTC](https://forum.inductiveautomation.com/t/add-python-modules/49337/3 "2021-07-29T12:06:36Z")

</div>

There are two main ways around this. Simplest is to use `system.util.execute('python', 'some/path/myScript.py')`. There are ways to capture the output of this though I cannot find the link currently.

Alternatively, if you don’t mind a little web development you can set up a simple flask server that you trigger the script with by doing a POST or similar request to it from Ignition. Do all your CPython related stuff in the flask API endpoint, and return a json of results to the Ignition request.

---

<div class="post-metadata">

**Author:** ![Corentin.appart](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Corentin.appart](https://forum.inductiveautomation.com/u/Corentin.appart)\
**Post date:** [July 29, 2021, 12:23pm UTC](https://forum.inductiveautomation.com/t/add-python-modules/49337/4 "2021-07-29T12:23:22Z")

</div>

Thanks for your reply, i thought about this solution (system.util.execute…) i will try

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 29, 2021, 12:25pm UTC](https://forum.inductiveautomation.com/t/add-python-modules/49337/5 "2021-07-29T12:25:04Z")

</div>

> [@Procedure for installing python libraries from source](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/18):
>
> Where are you running this, and is the Python binary and test script located on the same machine? That code worked fine for me in the Designer script console with some changes for my environment: from java.lang import ProcessBuilder, String pb = ProcessBuilder([r"python", r"/Users/kevin/Desktop/test.py"]) process = pb.start() output = String(process.getInputStream().readAllBytes()) print output

In case you need the output from the system.util.execute method
