# Unsure how to install this 3rd party library?

**URL:** <https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [January 17, 2020, 3:49pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369 "2020-01-17T15:49:03Z")\
**Posts on this page:** 15\
**Page:** 1

<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:** [January 17, 2020, 3:49pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/1 "2020-01-17T15:49:03Z")

</div>

I know that outside libraries should be installed in the user-lib\pylib folder of Ignition. However, the one I want to use, `python-docx`, for making/editing word documents, only seems to have pip-install options, or a .tar.gz file to manually download.

Here’s the install link [https://python-docx.readthedocs.io/en/latest/user/install.html](https://python-docx.readthedocs.io/en/latest/user/install.html)

How can I import this into Ignition?

---

<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:** [January 17, 2020, 3:57pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/2 "2020-01-17T15:57:45Z")

</div>

You can try the procedure documented here:

> [@Procedure for installing python libraries from source](http://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/2):
>
> There’s actually a procedure you can use to use pip from within Jython to install packages, then link Ignition’s Jython lib to an-off-the-shelf Jython lib and use that…however, the article specifically calls out the twilio module as not working, because one of its dependencies, cffi, has C dependencies (IE, won’t work in Jython). For posterity, here’s the procedure, copied verbatim from an internal document: 0) On the server, install Java 8 if you haven’t already. Download the full Jython 2.…

---

<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:** [January 17, 2020, 4:04pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/3 "2020-01-17T16:04:55Z")

</div>

`3. Open a CMD prompt in admin mode. (Not PowerShell) “cd” to the /bin`

/bin of what directory?

---

<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:** [January 17, 2020, 4:08pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/4 "2020-01-17T16:08:41Z")

</div>

Guessing, but probably `/bin` of the Jython install directory.

---

<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:** [January 17, 2020, 4:11pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/5 "2020-01-17T16:11:48Z")

</div>

Yea that’s correct. Having other issues now with `Error loading Python DLL. C:\jython2.7.1\bin\python27.dll (error cdoe 14001)` when I run it. Seems to be a known issue with the jython.exe.

Seems to be a solution here [https://answers.launchpad.net/sikuli/+question/678530](https://answers.launchpad.net/sikuli/+question/678530) which points to [https://github.com/jeff5/jython-devguide/blob/6af870e1461dc96aaef2a4be954e0b5c61bb3567/setup\_jy.rst#the-launcher-jythonexe](https://github.com/jeff5/jython-devguide/blob/6af870e1461dc96aaef2a4be954e0b5c61bb3567/setup_jy.rst#the-launcher-jythonexe). Going to try this and see how it goes.

---

<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:** [January 17, 2020, 4:27pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/6 "2020-01-17T16:27:39Z")

</div>

Can’t seem to get this to work. Not sure why. I also downloaded both necessary libraries, lmxl and python-docx from their github repos and tried that but with no success.

---

<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:** [January 17, 2020, 6:02pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/7 "2020-01-17T18:02:53Z")

</div>

I feel like I almost got it. Through some manual downloads and extractions, I got the docx folder that I need. However when I try to run the sample code from the documentation, `from docx import Document` I get

```auto
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Users\bkarabinchak\.ignition\cache\gwlocalhost_8088\C0\pylib\docx\ __init__.py", line 3, in <module>
    from docx.api import Document # noqa
  File "C:\Users\bkarabinchak\.ignition\cache\gwlocalhost_8088\C0\pylib\docx\api.py", line 14, in <module>
    from docx.package import Package
  File "C:\Users\bkarabinchak\.ignition\cache\gwlocalhost_8088\C0\pylib\docx\package.py", line 9, in <module>
    from docx.opc.package import OpcPackage
  File "C:\Users\bkarabinchak\.ignition\cache\gwlocalhost_8088\C0\pylib\docx\opc\package.py", line 9, in <module>
    from docx.opc.part import PartFactory
  File "C:\Users\bkarabinchak\.ignition\cache\gwlocalhost_8088\C0\pylib\docx\opc\part.py", line 12, in <module>
    from .oxml import serialize_part_xml
  File "C:\Users\bkarabinchak\.ignition\cache\gwlocalhost_8088\C0\pylib\docx\opc\oxml.py", line 12, in <module>
    from lxml import etree
ImportError: cannot import name etree

```

I believe I have the correct lxml folder as well, but I’ve tried placing it in a few different locations, in pylib as well as inside docx to no avail. If someone could help me figure out where to put the lxml folder I things will work.

To replicate what I have, extract the docx folder and put it so its path is C:\Program Files\Inductive Automation\Ignition\user-lib\pylib\docx. What I am trying to figure out is where to put the lxml folder, or perhaps change the import statements in the docx as a last resort if need be.

[lxml.zip](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d1df32d73ca6c86a8161f38471b78024909968ef.zip) (1.5 MB)

[docx.zip](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7a516872bd6ff99fdd778a7c60bfd86b53129c63.zip) (1.7 MB)

---

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [July 25, 2021, 2:41pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/8 "2021-07-25T14:41:47Z")

</div>

Were you ever able to get the python-docx installed?

---

<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 25, 2021, 5:06pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/9 "2021-07-25T17:06:01Z")

</div>

It has components written in C for CPython. It cannot load in jython.

---

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [July 25, 2021, 5:34pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/10 "2021-07-25T17:34:24Z")

</div>

Thanks Phil, that’s unfortunate. Have you heard of any of any other way to accomplish programmatic docx creation or editing?

---

<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 25, 2021, 7:09pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/11 "2021-07-25T19:09:13Z")

</div>

The [Apache POI](https://poi.apache.org/) java library for Microsoft Office file handling is natively included in Ignition nowadays.

---

<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 26, 2021, 12:23pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/12 "2021-07-26T12:23:03Z")

</div>

There is a 3rd party module that uses the Apache POI mentioned -

> **[PA Office Document Module](http://www.perfectabstractions.com/pa-office-document-module.html)**
>
> Price: $200 The Perfect Abstractions (PA) Document Module provides access to the  Apache POI Java library  for read/writing Microsoft office documents. The Apache POI Java library classes can be...

---

<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 26, 2021, 1:22pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/13 "2021-07-26T13:22:17Z")

</div>

An add-on module is not necessary in current Ignition versions.

---

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [July 27, 2021, 2:15am UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/14 "2021-07-27T02:15:40Z")

</div>

Wow this is news to me! Sounds promising. Does anyone have any starter documentation on how to use it?

---

<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:** [July 27, 2021, 2:59pm UTC](https://forum.inductiveautomation.com/t/unsure-how-to-install-this-3rd-party-library/31369/15 "2021-07-27T14:59:15Z")

</div>

See this topic for some introduction:

> [@Copying an Excel file to a table's dataset](https://forum.inductiveautomation.com/t/copying-a-excel-file-to-a-tables-dataset/34942/7):
>
> The [Apache POI](https://poi.apache.org/apidocs/4.1/index.html) libraries are included with Ignition. At the time I was only needing to read files, so xlrd was all that was necessary. I'm just starting to dig into POI, myself, but here's a start: EDIT 2021-08-23: Updated to allow JsonDataSets. Changed to allow for a ByteArray output instead of writing to a file. EDIT 2023-01-20: Added option for date formats. Default is 'yyyy-MM-dd hh:mm:ss'. EDIT 2023-05-12: Added options for first row and column, if needed to offset from A1 def datasetT…
