# "Python Scope: The specified Python path is not valid." Error

**URL:** <https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233>\
**Category:** Activities\
**Tags:** python-scope, question, python, activities\
**Created:** [December 29, 2022, 9:14pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233 "2022-12-29T21:14:20Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 29, 2022, 9:14pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/1 "2022-12-29T21:14:20Z")

</div>

I am struggling to resolve an error I am getting when I run the Python Scope activity. The error is “Python Scope: The specified Python path is not valid”. I have confirmed that the path string I am entering matches the path listed in my environment variables. It also matches the path shown when I type “where python” in cmd. I am hoping for any guidance.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/b/4/a/b4a791b77e613e7f8155c73fa3e16e0261302652.png)

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [December 29, 2022, 9:55pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/2 "2022-12-29T21:55:04Z")

</div>

Hi @Trevor_Alexander ,

**Welcome to UiPath Forum 🙂**

> [@Trevor\_Alexander](#):
>
> Python Scope: The specified Python path is not valid

Please check the python installed file location from your machine.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/8/d/9/8d9b7a7134ddab54f0db4dd7360d055dedaed71c.png)

like above image check in from your machine for python and update the path.  
Regards,  
Arivu

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 29, 2022, 10:23pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/3 "2022-12-29T22:23:05Z")

</div>

Thanks Arivu,

see image below. It looks like the path from cmd matches the path from my first image?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/1/f/3/1f32b1981e305f0848b2f3e6adf47e5f8e14ab95.png)

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [December 29, 2022, 10:31pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/4 "2022-12-29T22:31:59Z")

</div>

Hi @Trevor_Alexander ,  
kindly provide full path and try. if not works try next path.

Regards,  
Arivu

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 30, 2022, 12:47am UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/5 "2022-12-30T00:47:47Z")

</div>

I tried all three paths with the same result (and adjusted the python version on the properties pane). Still not working. I’m perplexed.

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 30, 2022, 12:57pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/6 "2022-12-30T12:57:43Z")

</div>

Bumping this in case anyone has thoughts. Does python scope not work for studiox?

---

<div class="post-metadata">

**Author:** ![Rahul\_Unnikrishnan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rahul_unnikrishnan/32/464046_2.png) [@Rahul\_Unnikrishnan](https://forum.uipath.com/u/Rahul_Unnikrishnan)\
**Post date:** [December 30, 2022, 1:04pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/7 "2022-12-30T13:04:04Z")

</div>

Hello @Trevor_Alexander

Please check the below video.

[![](https://global.discourse-cdn.com/uipath/original/4X/8/f/2/8f2754f248ccc164ad10ae5632ddb6727b5aa89f.jpeg "How to Execute Python Scripts in UiPath?| UiPath Python Activities| Python Scope| Load Python Script") ](https://www.youtube.com/watch?v=ysyH37iF-8Q)

Thanks

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 30, 2022, 1:42pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/8 "2022-12-30T13:42:54Z")

</div>

Thank you for sending this video. After watching the video, the way that the he is finding the path and setting the path variable to the path matches the steps I am taking. No resolution yet.

---

<div class="post-metadata">

**Author:** ![marian.platonov](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/marian.platonov/32/260263_2.png) [@marian.platonov](https://forum.uipath.com/u/marian.platonov)\
**Post date:** [December 30, 2022, 3:39pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/9 "2022-12-30T15:39:12Z")

</div>

Try the UiPath.Python.Activities[1.6.0] for the Python 3.10

Setup example for Python Scope:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/c/e/2/ce20467055f00d231d54c2a0c4688079158617dc.png)

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 30, 2022, 5:20pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/10 "2022-12-30T17:20:55Z")

</div>

Thanks Marian but I am still getting the error even with your suggestion. See image below which has the error, the path from cmd, and my properties inputs within view. It’s very strange.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/9/b/9/9b941d883dcc94afed7af1c65cbafb00e6ba567b.jpeg)

---

<div class="post-metadata">

**Author:** ![marian.platonov](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/marian.platonov/32/260263_2.png) [@marian.platonov](https://forum.uipath.com/u/marian.platonov)\
**Post date:** [December 30, 2022, 7:09pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/12 "2022-12-30T19:09:50Z")

</div>

Did you try Studio, not StudioX?  
Which is your project type (Windows or Windows-Legacy)?  
Try in the failed path to add in the end “…Programs\Python\Python310\”

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 30, 2022, 8:10pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/13 "2022-12-30T20:10:28Z")

</div>

StudioX. I haven’t tried Studio. I’m pretty far along in my project. Would it take a lot of work to convert it to Studio?

Its Windows (not legacy).

I tried adding in the \ at the end with the same result.

---

<div class="post-metadata">

**Author:** ![Trevor\_Alexander](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/trevor_alexander/32/192921_2.png) [@Trevor\_Alexander](https://forum.uipath.com/u/Trevor_Alexander)\
**Post date:** [December 30, 2022, 8:26pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/14 "2022-12-30T20:26:54Z")

</div>

I switched to Studio from StudioX. It seems to be “thinking” now instead of immediately throwing an error but its stuck on the Python Scope initialization and won’t move to load script. Any thoughts?

---

<div class="post-metadata">

**Author:** ![karsten.beck](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/karsten.beck/32/512955_2.png) [@karsten.beck](https://forum.uipath.com/u/karsten.beck)\
**Post date:** [March 9, 2023, 12:44pm UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/15 "2023-03-09T12:44:11Z")

</div>

Hi Trevor, did you fix this? I came across this problem and solved it by installing  
[.NET Desktop Runtime 5.0.17] as noted in [https://docs.uipath.com/activities/docs/python-scope](https://docs.uipath.com/activities/docs/python-scope)  
Regards  
K.

---

<div class="post-metadata">

**Author:** ![Jesus\_Fonseca](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jesus_fonseca/32/267228_2.png) [@Jesus\_Fonseca](https://forum.uipath.com/u/Jesus_Fonseca)\
**Post date:** [September 25, 2025, 6:00am UTC](https://forum.uipath.com/t/python-scope-the-specified-python-path-is-not-valid-error/503233/16 "2025-09-25T06:00:14Z")

</div>

Thats works for me, TY
