# Procedure for installing python libraries from source

**URL:** <https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022>\
**Category:** Ignition\
**Created:** [June 21, 2019, 6:07pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022 "2019-06-21T18:07:46Z")\
**Posts on this page:** 14\
**Page:** 2

<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:** [July 29, 2021, 1:08pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/22 "2021-07-29T13:08:29Z")

</div>

Uhm, gateway events run in the gateway service, not in your workstation.

---

<div class="post-metadata">

**Author:** ![c.bertulli](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@c.bertulli](https://forum.inductiveautomation.com/u/c.bertulli)\
**Post date:** [August 12, 2021, 3:06pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/23 "2021-08-12T15:06:44Z")

</div>

> [@JordanCClark](#):
>
> pySerial uses DLLs which you can’t use in Jython.

How did you figure it out? ( I'm genuinely curious about it )  
The official link says that the packages are 100% pure python and that is also usable with Jython

> **[pySerial — pySerial 3.5 documentation](https://pyserial.readthedocs.io/en/latest/pyserial.html)**

Cheers,  
Cristian

---

<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:** [August 12, 2021, 3:11pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/24 "2021-08-12T15:11:47Z")

</div>

That it uses DLLs isn’t quite accurate. It uses platform-specific modules like `win32` and `ctypes`, which aren’t fully implemented in Jython.

It does mention that it “works on Jython” with the caveat that you have a JavaComm implementation on the ClassPath, which is basically saying “BYO serial implementation that conforms to this API”, but you don’t have that and the JavaComm API is old, crusty, and deprecated.

This probably deserves a separate topic if further discussion is necessary.

---

<div class="post-metadata">

**Author:** ![mitchell-ACS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mitchell-acs/32/30062_2.png) [@mitchell-ACS](https://forum.inductiveautomation.com/u/mitchell-ACS)\
**Post date:** [March 17, 2022, 10:20pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/25 "2022-03-17T22:20:23Z")

</div>

Hey @paul-griffith, are there similar instructions to follow with the Gateway running in Linux?

---

<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:** [March 17, 2022, 10:47pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/26 "2022-03-17T22:47:06Z")

</div>

The instructions would be essentially the same, just with commands like `ln` instead of `mklink`.

---

<div class="post-metadata">

**Author:** ![bradbarbin](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bradbarbin](https://forum.inductiveautomation.com/u/bradbarbin)\
**Post date:** [March 21, 2022, 9:28pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/27 "2022-03-21T21:28:37Z")

</div>

If you’re in to transport protocols, here’s a two-liner for POSIX that you can use to get the libraries listed below:

```auto
git clone https://github.com/barbinbrad/ignition-jython-modules
rsync -r --exclude '.git' ignition-jython-modules/. /usr/local/ignition/user-lib/pylib

```

- [requests](https://docs.python-requests.org/en/latest/) (HTTP Client)
- [paho.mqtt](https://github.com/eclipse/paho.mqtt.python#usage-and-api) (MQTT Client)
- [sparkplug\_b](https://github.com/eclipse/tahu/blob/master/sparkplug_b/stand_alone_examples/python/example_simple.py) (CirrusLink/Eclipse Tahu)

_Note: There’s no security problems here, but you don’t know me, so it’s good to assume that there are. The better approach is to build your own jython modules instead of using trusting anyone. This is just an example of how you might do something similar._

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [November 26, 2025, 3:42pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/28 "2025-11-26T15:42:11Z")

</div>

I’m lost in the details…

Using Ignition 8.3.1 (b2025102109) I need to  
`import requests`  
`from requests_ntlm import HttpNtlmAuth`

I’ve installed python and jython; both were successful doing `pip install requests-2.7.9.tar.gz`

Ignition still says `ImportError: No module named requests`

Using Visual Studio Code python _(first time ever)_, I’m able to get the responses I need with help of the `HttpNtlmAuth` library to be recognized as an authorized user.

How can I make these libraries available to Ignition so I can run my project script from Gateway Tag Events and Perspective component onActionPerformed events?

---

<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:** [November 26, 2025, 3:44pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/29 "2025-11-26T15:44:06Z")

</div>

You 100% do not need to install requests. Use [system.net.httpClient | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-net/system-net-httpClient)

to handle all your HTTP requests. Use ignitions library to handle and manage HTTP requests full stop.

---

<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:** [November 26, 2025, 3:47pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/30 "2025-11-26T15:47:50Z")

</div>

Ignition uses its own jython, not your system jython. Using `pip` with your system jython doesn't put the libraries in the right places.

But even if it did, it is still unwise. Mainly because of long-standing jython bugs that aren't relevant when using Ignition-provided services (or java-provided services).

Also keep in mind that CPython libraries that have any `C` component (like `numpy` and friends) are utterly and unfixably incompatible with Jython.

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [November 26, 2025, 4:06pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/31 "2025-11-26T16:06:13Z")

</div>

as far as I can see, and consistent with response from a help ticket with IA, `system.net.httpClient` doesn’t handle NTLM.

The author of the API I’m calling tells me that NTLM is the only way to authenticate; that’s why I’m trying to `from requests_ntlm import HttpNtlmAuth`.

I will be very happy to use only resources provided by Ignition.

---

<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:** [November 26, 2025, 4:08pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/32 "2025-11-26T16:08:39Z")

</div>

Ah ok fair enough. Probably warrants it’s own post. Search for ‘NLTM’ in the forum though and you will find hits. Perhaps this suits you [Download document from SharePoint (NTLM Authentication) - #7 by ryanjmclaughlin](https://forum.inductiveautomation.com/t/download-document-from-sharepoint-ntlm-authentication/69474/7)

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [November 26, 2025, 4:12pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/33 "2025-11-26T16:12:18Z")

</div>

Thanks 👍

I’ve been following that and a handful of other posts (like the title of this one) but so far, just can’t get from A to B.

Found this post: [Calling Web API using windows(NTLM) authentication - General Discussion - Inductive Automation Forum](https://forum.inductiveautomation.com/t/calling-web-api-using-windows-ntlm-authentication/90365)

> [@Calling Web API using windows(NTLM) authentication](https://forum.inductiveautomation.com/t/calling-web-api-using-windows-ntlm-authentication/90365/2):
>
> There's no support for NTLM authentication in either the old `system.net` functions or the newer `system.net.httpClient` functions. You won't be able to call this API if that's the only authentication mechanism supported.

---

<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:** [November 26, 2025, 4:34pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/34 "2025-11-26T16:34:35Z")

</div>

> [@Lynn\_Martineau](#):
>
> can’t get from A to B

As Brian's linked topic shows, that is a **working** approach.

The Apache libraries needed are **shipped with Ignition**. You don't have to add anything to your system.

The libraries are available in **all scopes**.

Please start a new topic, share all your code, and the details of the results you are getting. (Use preformatted text for code and logs.)

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [November 26, 2025, 8:49pm UTC](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/35 "2025-11-26T20:49:53Z")

</div>

New topic: [Help with NTLM Authentication and POST commands in 8.3 - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/help-with-ntlm-authentication-and-post-commands-in-8-3/112465)

[Previous page](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022.md?page=1)
