# Python Scope: Error initializing Python engine

**URL:** <https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963>\
**Category:** Studio\
**Tags:** activities-panel, question, studio, python, activities\
**Created:** [September 26, 2022, 10:59am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963 "2022-09-26T10:59:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 26, 2022, 10:59am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/1 "2022-09-26T10:59:49Z")

</div>

Hello,  
I am facing this error while running the process.  
Python Scope: Error initializing Python engine

 ![Error](https://global.discourse-cdn.com/uipath/original/4X/9/5/4/9544b8e6979f96682de3eb5d8d705913fe97a54a.jpeg)

---

<div class="post-metadata">

**Author:** ![Sanjit\_Pal](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sanjit_pal/32/193785_2.png) [@Sanjit\_Pal](https://forum.uipath.com/u/Sanjit_Pal)\
**Post date:** [September 26, 2022, 11:07am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/2 "2022-09-26T11:07:46Z")

</div>

have a look on this thread.

> [@Unable to run Python Scope: Error initializing Python engine 64 bit](https://forum.uipath.com/t/unable-to-run-python-scope-error-initializing-python-engine-64-bit/400884):
>
> Hello All, I am unable to run python scope with Uipath.Python.Activities 1.6.0 for python 310 x64 version any clue on what am I missing here? Python is installed in location : “C:\Users.…\AppData\Local\Programs\Python\Python310” the same path is also available in environment variables PATH When I run the python from my VS code it works and I get a response. Is there any environment that I need to adjust for uipath to load python properly? or am I missing on the parameters to be used correc…

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 11:11am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/3 "2022-09-26T11:11:27Z")

</div>

Hi @Aastha_Singh  
Kindly check your Path properties of the python scope.  
It should be the location of python installed on your machine.

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 11:14am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/4 "2022-09-26T11:14:07Z")

</div>

@Aastha_Singh  
Kindly have look at the python activity process in this thread

> [@Integrating Python script for Encrypt and Decrypt](https://forum.uipath.com/t/integrating-python-script-for-encrypt-and-decrypt/461503):
>
> Hello Guys, I would like to present this tutorial who are looking for Encrypt and Decrypt in Python. Refer the thread to install Python : [Python installation and Pip Installation](https://forum.uipath.com/t/python-installation-and-pip-installation/461504) Following steps that need to Encrypt and Decrypt Install “Uipath.Pyton.Activities” [image] Python Process always work Within in Python scope. Drag and drop the “Python Scope” 3.1. Python Scope Property → Input\>Path- Need to provide the installation path of Python application. 3.2. Target → Enter the Bit do…

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 26, 2022, 11:33am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/5 "2022-09-26T11:33:14Z")

</div>

Provided path are correct.  
The execution of process running perfectly 4 to 5 times, But Now currently I am facing this Issue.

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 11:37am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/6 "2022-09-26T11:37:14Z")

</div>

@Aastha_Singh  
Try the path like as below

```auto
“C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python36”

```

---

<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:** [September 26, 2022, 11:37am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/7 "2022-09-26T11:37:39Z")

</div>

Hello @Aastha_Singh

Can you please check whether any python update has happened? Also 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:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 11:45am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/8 "2022-09-26T11:45:25Z")

</div>

@Aastha_Singh  
Try this Envinomental dynamic path

```auto
Environment.ExpandEnvironmentVariables("%USERPROFILE%\AppData\Local\Programs\Python\Python38")

```

And are you using the python 3.9 version?

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 26, 2022, 11:56am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/9 "2022-09-26T11:56:01Z")

</div>

I am using the python 3.6.2 version.

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 12:01pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/10 "2022-09-26T12:01:53Z")

</div>

@Aastha_Singh  
Are you using windows or Linux

If windows leave the library path as empty.

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

Above Version 3.9 or Linux only need to Give the library path

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 26, 2022, 12:04pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/11 "2022-09-26T12:04:11Z")

</div>

I am using windows.

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

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 12:08pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/12 "2022-09-26T12:08:22Z")

</div>

@Aastha_Singh  
Kindly check your Path, It starts with “(” kindly remove it and try again

or

> [@Gokul\_Jayakumar](#):
>
> `Environment.ExpandEnvironmentVariables("%USERPROFILE%\AppData\Local\Programs\Python\Python38")`

Look above dynamic path, after \AppData\ correct the path for your machine

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 12:15pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/13 "2022-09-26T12:15:02Z")

</div>

@Aastha_Singh  
Also check your working Folder

Working folder must be your project location.

```auto
Environment.CurrentDirectory

```

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 26, 2022, 12:22pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/14 "2022-09-26T12:22:15Z")

</div>

yes, working folder is in the project folder location.

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 26, 2022, 12:29pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/15 "2022-09-26T12:29:23Z")

</div>

If possible kindly send the path of the Working and app folder that you feed in the Python scope.  
Also try this

1. Check if your python is Updated or not
2. Also check if your python is X86.
3. Check whether Python is working or not? Open CMD-\> Type “python” and enter

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 27, 2022, 10:53am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/16 "2022-09-27T10:53:53Z")

</div>

Path :

 ![image](https://global.discourse-cdn.com/uipath/original/4X/b/7/c/b7ce1a91cb745b800b73a9cba0b7dfdbee8982fa.png)  
working folder:  
Environment.CurrentDirectory

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 27, 2022, 10:56am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/17 "2022-09-27T10:56:35Z")

</div>

> [@Aastha\_Singh](#):
>
> ![image](https://global.discourse-cdn.com/uipath/original/4X/b/7/c/b7ce1a91cb745b800b73a9cba0b7dfdbee8982fa.png)
> 
> working folder:  
> Environment.CurrentDirectory

Try this

```auto
Environment.ExpandEnvironmentVariables("%USERPROFILE%\AppData\Local\Programs\Python\Python36-32")

```

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 27, 2022, 11:00am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/18 "2022-09-27T11:00:12Z")

</div>

Like this:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/c/7/e/c7ea06c770d8fa04922059d49ba0811105a9dfb8.png)  
Error:  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/f/2/6/f266db1f8d55f18241929e0e72c4a392532d9812.png)

---

<div class="post-metadata">

**Author:** ![Gokul\_Jayakumar](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul_jayakumar/32/425938_2.png) [@Gokul\_Jayakumar](https://forum.uipath.com/u/Gokul_Jayakumar)\
**Post date:** [September 27, 2022, 11:03am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/19 "2022-09-27T11:03:21Z")

</div>

Kindly check the directory in your user’s local path and vefify the python folder

 ![image](https://global.discourse-cdn.com/uipath/original/4X/1/5/1/151791a3cdc1cc63156581061c4f77028fc1afb6.png)

---

<div class="post-metadata">

**Author:** ![Aastha\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aastha_singh/32/311179_2.png) [@Aastha\_Singh](https://forum.uipath.com/u/Aastha_Singh)\
**Post date:** [September 27, 2022, 11:26am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963/20 "2022-09-27T11:26:30Z")

</div>

I am facing same error after set the environment variable & give the path location.

 ![Error](https://global.discourse-cdn.com/uipath/original/4X/b/5/c/b5c8374617ae439df7a2ccc1faff1853165e1032.png)

[Next page](https://forum.uipath.com/t/python-scope-error-initializing-python-engine/475963.md?page=2)
