# Unable to import module named xlrd

**URL:** <https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195>\
**Category:** Ignition\
**Created:** [July 29, 2020, 4:11pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195 "2020-07-29T16:11:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [July 29, 2020, 4:11pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/1 "2020-07-29T16:11:56Z")

</div>

Good morning,

I am trying to add a 3rd party module to Ignition called xlrd. However, when I go to run my script the module is not found.

This link here suggests changing the module location:

> [@ImportError: No module named abc](http://forum.inductiveautomation.com/t/importerror-no-module-named-abc/17150):
>
> Greetings I created a library function and hope to reuse it But then i got this error. I search through and read through the forum posts and tried but still could not resolve it. Finally i just copy an existing file decimal.py and rename it as abc.py and try to import it but it still gives the same error as “ImportError: No module named abc” However, there wasnt any error for the line comprising of the import decimal. Both files are located in the same folder in pylib So could someone pleas…

I can then import the module from the script Console but not the script I am running.

Any help with what I am doing wrong is appreciated.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [July 29, 2020, 5:52pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/2 "2020-07-29T17:52:15Z")

</div>

What version of xlrd did you download?  
Also what version of Ignition are you using?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 29, 2020, 6:28pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/3 "2020-07-29T18:28:18Z")

</div>

> [@Copying an Excel file to a table's dataset](http://forum.inductiveautomation.com/t/copying-a-excel-file-to-a-tables-dataset/34942/5):
>
> xlrd works with Jython 2.7. Unzip this into the user-lib/pylib/site-packages folder. [xlrd.zip](https://forum.inductiveautomation.com/uploads/short-url/rZTrGR58x9kIfTHEBhHHkzyJsLw.zip) (283.0 KB) [Documentation](https://xlrd.readthedocs.io/en/latest/)

You may also have to restart your designer to get a local copy. I don't quite remember.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 29, 2020, 6:29pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/4 "2020-07-29T18:29:46Z")

</div>

Bear in mind that I was only able to get it to work properly in v8. I never had any success in 7.9.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 29, 2020, 6:31pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/5 "2020-07-29T18:31:39Z")

</div>

Whoops!Just sunk in what your issue is. Where are you trying to run the script from? And where did you install xlrd?

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [July 29, 2020, 7:20pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/6 "2020-07-29T19:20:08Z")

</div>

Hello,

I installed the folder you attached here:  
C:\Program Files\Inductive Automation\Ignition\user-lib\pylib

I then went to my script console and typed in “import xlrd”  
Error message in script console: ImportError: No module named xlrd

If I can get that to work I’ll try the script again.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 29, 2020, 7:21pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/7 "2020-07-29T19:21:51Z")

</div>

you need a site-packages folder.  
`C:\Program Files\Inductive Automation\Ignition\user-lib\pylib\site-packages`

 ![Annotation 2020-07-29 152310](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/74ed9dd10662c13c98a9c40759a709ae8d2eea0e.png)

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [July 29, 2020, 7:33pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/8 "2020-07-29T19:33:19Z")

</div>

That seemed to work for the console and the script I was running. I got my original info from here…

[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/98/2/importing-and-using-3rd-party-python-libraries-in-ignition](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/98/2/importing-and-using-3rd-party-python-libraries-in-ignition)

Do I need to put the folder in both locations or just the site-packages one you mentioned?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 29, 2020, 8:38pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/9 "2020-07-29T20:38:01Z")

</div>

The site-packages should be all you need.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 29, 2020, 8:43pm UTC](https://forum.inductiveautomation.com/t/unable-to-import-module-named-xlrd/37195/10 "2020-07-29T20:43:23Z")

</div>

> [@bmeyers](#):
>
> That seemed to work for the console and the script I was running. I got my original info from here…
> 
> [https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/98/2/importing-and-using-3rd-party-python-libraries-in-ignition](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/98/2/importing-and-using-3rd-party-python-libraries-in-ignition)
> 
> Do I need to put the folder in both locations or just the site-packages one you mentioned?

Things got changed up a bit for v8. The site-packages folder more of a python standard.

> [@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.…
