# Why Load Python Script activity can't read the Python modules despite already installed on my system?

**URL:** <https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173>\
**Category:** Activities\
**Tags:** python, activities\
**Created:** [September 29, 2020, 10:16pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173 "2020-09-29T22:16:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCLuna](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@JCLuna](https://forum.uipath.com/u/JCLuna)\
**Post date:** [September 29, 2020, 10:16pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/1 "2020-09-29T22:16:27Z")

</div>

Hi, everyone.

I tried to know why UiPath send me the follow error at “Load Python Script”:

Source: Load Python Script  
Message: Error loading Python script  
Exception Type: System.InvalidOperationException

Into this error message appear the follow message: “ModuleNotFoundError : No module named ‘pandas’”

I reviewed if that module exists on my system through Anaconda, and that’s right, including modules as “numpy”, “os”, “tabula”, among others.

So, I don’t know what’s the problem.

I hope that you help me, because this is the unique detail that stops me.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![1996](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/1996/32/291775_2.png) [@1996](https://forum.uipath.com/u/1996)\
**Post date:** [September 30, 2020, 4:26am UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/2 "2020-09-30T04:26:58Z")

</div>

Hi @JCLuna,

Welcome to UiPath forum !

Try this below link:

> [@System.InvalidOperationException while loading Python Script](https://forum.uipath.com/t/system-invalidoperationexception-while-loading-python-script/109014):
>
> Hi ! I am getting a System.InvalidOperationException while trying to load a very simple Python script. I’ve installed Python 3.6 32 bit inside my project folder, so the python executable is at Python/python.exe path from the root folder. I don’t have any issue running or importing my script from the Powershell command line. I reproduced the error even with an extremely basic script: I’ve attached an example of a workflow and a python script (as a zip file) that throw the error. Here is the…

Thanks,  
Neelima.

---

<div class="post-metadata">

**Author:** ![JCLuna](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@JCLuna](https://forum.uipath.com/u/JCLuna)\
**Post date:** [September 30, 2020, 3:30pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/3 "2020-09-30T15:30:06Z")

</div>

Thanks, but, reading that issue, is different from what I need. My issue is UiPath does not recognize that Python modules/libraries as “numpy”, “pandas”, “tabula”, “tensorflow”, among others, are already installed. For this issue, UiPath show me the message at “Load Python Script” activity.

Do you suggest me reinstall UiPath or something else?

Thank you!

---

<div class="post-metadata">

**Author:** ![1996](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/1996/32/291775_2.png) [@1996](https://forum.uipath.com/u/1996)\
**Post date:** [September 30, 2020, 6:18pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/4 "2020-09-30T18:18:49Z")

</div>

Did you try to run your script from the command line before integrating it to UiPath?

---

<div class="post-metadata">

**Author:** ![JCLuna](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@JCLuna](https://forum.uipath.com/u/JCLuna)\
**Post date:** [September 30, 2020, 7:27pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/5 "2020-09-30T19:27:43Z")

</div>

Yes. I did. But the most curiously is that I try run the script with the command prompt of Windows and appear the same message:

C:\Users\X\>C:\Users\X\AppData\Local\Programs\Python\Python36\python.exe C:\Users\X\Documents\UiPath\Python\_First\_Test\Test.py  
Traceback (most recent call last):  
File “C:\Users\X\Documents\UiPath\Python\_First\_Test\Test.py”, line 4, in   
import pandas as pd  
ModuleNotFoundError: No module named ‘pandas’

In fact, into my script file, I tried to write this form:

import sys  
import os  
sys.path.append(“C:\Users\X\Documents\Python Scripts”)  
import pandas as pd

But, it doesn’t function.

Thanks!

---

<div class="post-metadata">

**Author:** ![1996](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/1996/32/291775_2.png) [@1996](https://forum.uipath.com/u/1996)\
**Post date:** [October 1, 2020, 4:07am UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/6 "2020-10-01T04:07:37Z")

</div>

This article might helps

> **[Pandas - ModuleNotFoundError - No Module Named Pandas and Functions Explained...](https://cppsecrets.com/users/5271114105115104979810446114107495548525364103109971051084699111109/Pandas-ModuleNotFoundError-No-Module-Named-Pandas-and-Functions-Explained.php)**
>
> C++ and Python Professional Handbooks : A platform for C++ and Python Engineers, where they can contribute their C++ and Python experience along with tips and tricks. Reward Category : Most Viewed Article and Most Liked Article

---

<div class="post-metadata">

**Author:** ![edang](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/edang/32/180560_2.png) [@edang](https://forum.uipath.com/u/edang)\
**Post date:** [November 10, 2020, 12:17pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/7 "2020-11-10T12:17:08Z")

</div>

HI, I have the same problem as your’s.

Were you able to resolve?

My post of problem, which i later narrow the problem down to not being able to perform “import” function. So My problem looks to be the same as yours

> [@Load Python Script: One or more errors occurred](https://forum.uipath.com/t/load-python-script-one-or-more-errors-occurred/264497/11):
>
> Hi Gustavo, Haha slight_smile I faced the same error from UIPath Studio when I try to load the updated ‘test.py’ FYI I can run text-summarizer.py successfully using my python environment (without UIPath Studio use), so my python environment have the required python libraries

---

<div class="post-metadata">

**Author:** ![NIVED\_NAMBIAR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nived_nambiar/32/169066_2.png) [@NIVED\_NAMBIAR](https://forum.uipath.com/u/NIVED_NAMBIAR)\
**Post date:** [November 10, 2020, 12:44pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/8 "2020-11-10T12:44:43Z")

</div>

Hi did u check whether pandas module is already installed?

---

<div class="post-metadata">

**Author:** ![edang](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/edang/32/180560_2.png) [@edang](https://forum.uipath.com/u/edang)\
**Post date:** [November 10, 2020, 1:48pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/9 "2020-11-10T13:48:18Z")

</div>

Yes I was able perform “import panda” in python IDE (not uipath studio)

---

<div class="post-metadata">

**Author:** ![davis\_ui](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/davis_ui/32/184004_2.png) [@davis\_ui](https://forum.uipath.com/u/davis_ui)\
**Post date:** [February 16, 2021, 2:20pm UTC](https://forum.uipath.com/t/why-load-python-script-activity-cant-read-the-python-modules-despite-already-installed-on-my-system/259173/10 "2021-02-16T14:20:33Z")

</div>

My case might be unique but this is how I got the issue resolved. For me, turned out it was due to confusion with having multiple versions of Python. In the IDE where the code worked fine for me, I checked the path where that version of Python was

> > > import os  
> > > import sys  
> > > os.path.dirname(sys.executable)

When I used the path that came from this, into the Python Scope activity’s Input “Path” argument, it resolved the issue for me. Hope this helps!
