# Python Scope in UIPath

**URL:** <https://forum.uipath.com/t/python-scope-in-uipath/552190>\
**Category:** StudioX\
**Tags:** question, python, studiox, activities\
**Created:** [June 8, 2023, 3:16am UTC](https://forum.uipath.com/t/python-scope-in-uipath/552190 "2023-06-08T03:16:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dicianolucas](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@dicianolucas](https://forum.uipath.com/u/dicianolucas)\
**Post date:** [June 8, 2023, 3:16am UTC](https://forum.uipath.com/t/python-scope-in-uipath/552190/1 "2023-06-08T03:16:42Z")

</div>

I’m using a Python Scope function in StudioX and it will run a test script just fine; however, as soon as I try and import a pandas package, it fails and says “pandas module not found.” The script runs just fine in spyder/visual studio code so it’s definitely a UiPath issue. How can I point UiPath towards where the pandas (and others) package is located?

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [June 8, 2023, 3:39am UTC](https://forum.uipath.com/t/python-scope-in-uipath/552190/2 "2023-06-08T03:39:11Z")

</div>

@dicianolucas

Welcome to the community

Did you happen to fill the path in the python scope activity?

Is the path variable in env variables filled? I hope you are pointing to right path and there is only one instance

Alternately try using load python script activity to load pandas

[https://docs.uipath.com/activities/other/latest/user-guide/load-script](https://docs.uipath.com/activities/other/latest/user-guide/load-script)

Cheers

---

<div class="post-metadata">

**Author:** ![dicianolucas](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@dicianolucas](https://forum.uipath.com/u/dicianolucas)\
**Post date:** [June 8, 2023, 5:41pm UTC](https://forum.uipath.com/t/python-scope-in-uipath/552190/3 "2023-06-08T17:41:18Z")

</div>

The path is filled out to point to the correct dll file. there is only one instance on the machine. import os or import openpyxl works, but importing pandas or numpy suddenly generates a “module not found” error. Load script was tried but it created a “pipe is broken” error.

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [June 8, 2023, 5:43pm UTC](https://forum.uipath.com/t/python-scope-in-uipath/552190/4 "2023-06-08T17:43:51Z")

</div>

@dicianolucas

The path is to be the python installation folder and not to any file

and I hope you are using python 3.10 below

cheers

---

<div class="post-metadata">

**Author:** ![Afsal\_Baaqir\_A](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/afsal_baaqir_a/32/418644_2.png) [@Afsal\_Baaqir\_A](https://forum.uipath.com/u/Afsal_Baaqir_A)\
**Post date:** [August 8, 2023, 1:43pm UTC](https://forum.uipath.com/t/python-scope-in-uipath/552190/5 "2023-08-08T13:43:39Z")

</div>

Hi, Have you tried executing simple Python scripts in StudioX, If so can you send that project file?  
I have tried on my own but, I don’t get any outputs also no errors too.
