# Python Scope: Error initializing Python engine - Can't RUn python script

**URL:** <https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643>\
**Category:** Studio\
**Tags:** bug, activities-panel, studio, python, activities\
**Created:** [April 20, 2023, 11:36am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643 "2023-04-20T11:36:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Silva](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rodrigo_silva/32/385448_2.png) [@Rodrigo\_Silva](https://forum.uipath.com/u/Rodrigo_Silva)\
**Post date:** [April 20, 2023, 11:36am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/1 "2023-04-20T11:36:39Z")

</div>

I wrote a simple regex method in python that I would like to invoke, it receives a text as input and outputs a regex dictionary to UiPath (that is my goal), I’ve tried to use the python activities and I keep getting this error it doesn’t even enter python scope:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/0/a/a/0aa0ed6a094ed7c86e024554fdb11e78824113d8.png)  
this is my regex example:  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/3/0/f/30fd1285c005de5dbbb408f7174f7346259e9bdc.png)  
can it be by the libraries imported? How does anyone have an idea how can i do it? I simply wrote it in python because i didn’t want to use several matches activities because I have to extract a lot of info. In this case I use a dictionary because (KEY, Value) my key would be an anchor to search in all the pdfs files (they are not structured) and give me the corresponding value. each key(anchor) is unique for all pdfs and I extract everything from them associated with the key

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [April 20, 2023, 11:57am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/3 "2023-04-20T11:57:48Z")

</div>

@Rodrigo_Silva

Can you select the version Instead of Auto to a specific version you have in your system and try

Hope this may help you

Thanks,  
Srini

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Silva](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rodrigo_silva/32/385448_2.png) [@Rodrigo\_Silva](https://forum.uipath.com/u/Rodrigo_Silva)\
**Post date:** [April 20, 2023, 12:08pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/4 "2023-04-20T12:08:13Z")

</div>

Still doesn’t work if I set to \>=3.10

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [April 20, 2023, 12:10pm UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/5 "2023-04-20T12:10:25Z")

</div>

@Rodrigo_Silva

Check below post for your reference

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

Hope this may help you

Thanks,  
Srini

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Silva](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rodrigo_silva/32/385448_2.png) [@Rodrigo\_Silva](https://forum.uipath.com/u/Rodrigo_Silva)\
**Post date:** [April 21, 2023, 12:16am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/6 "2023-04-21T00:16:25Z")

</div>

Already checked before, but nothing works… ty anyway

---

<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:** [April 21, 2023, 4:54am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/7 "2023-04-21T04:54:16Z")

</div>

@Rodrigo_Silva

Is the path provided is correct?

Please validate…i  
This is the installation path for example

`C:\Users\name\AppData\Local\Programs\Python\Python310`

Cheers

---

<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:** [April 21, 2023, 5:35am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/8 "2023-04-21T05:35:14Z")

</div>

orello @Rodrigo_Silva , In Command prompt, the type where python. The Python path will get and copy-paste paste path in Path Properties and the Working folder should be the path of the script located.  
Also, provide the Version details and Library path. Check the Target is x64

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

---

<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:** [April 21, 2023, 6:11am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/9 "2023-04-21T06:11:42Z")

</div>

If you are using Python 3.11.x it will not work in UiPath Studio at this moment. I tested with a Python [3.10.10 64-bit](https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe) and it is working.

In order to check your Python version, you can run in cmd.exe the **python --version** command.

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Silva](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rodrigo_silva/32/385448_2.png) [@Rodrigo\_Silva](https://forum.uipath.com/u/Rodrigo_Silva)\
**Post date:** [April 21, 2023, 9:53am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/10 "2023-04-21T09:53:10Z")

</div>

Thank you all for your time, all the paths were correct the solution is downgrading the python version

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Silva](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rodrigo_silva/32/385448_2.png) [@Rodrigo\_Silva](https://forum.uipath.com/u/Rodrigo_Silva)\
**Post date:** [April 21, 2023, 10:48am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/11 "2023-04-21T10:48:35Z")

</div>

By the way for me only worked with python 3.7 version I’ve tried from the 3.10 to 3.7 :), One more time thanks a lot for the feedback have a nice day!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [April 24, 2023, 10:49am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/12 "2023-04-24T10:49:06Z")

</div>

Closed on April 24, 2023, 10:49am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![loginerror](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/loginerror/32/22614_2.png) [@loginerror](https://forum.uipath.com/u/loginerror)\
**Post date:** [August 14, 2023, 8:44am UTC](https://forum.uipath.com/t/python-scope-error-initializing-python-engine-cant-run-python-script/537643/13 "2023-08-14T08:44:30Z")

</div>

> [@marian.platonov](#):
>
> If you are using Python 3.11.x it will not work in UiPath [Studio](https://docs.uipath.com/studio/docs/introduction) at this moment. I tested with a Python [3.10.10 64-bit](https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe) and it is working.

This a small message from the future 🙂

A new version of the Python package 1.7.1 was released which supports Python 3.11 (you can grab it from the official feed).
