# Python Scope uipath version and python version compatibility issue

**URL:** <https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744>\
**Category:** Studio\
**Tags:** properties-panel, question, studio, python, activities\
**Created:** [October 7, 2024, 1:50am UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744 "2024-10-07T01:50:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinoth4390](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vinoth4390](https://forum.uipath.com/u/vinoth4390)\
**Post date:** [October 7, 2024, 1:50am UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/1 "2024-10-07T01:50:39Z")

</div>

I have requirement to use python scope activity. I have installed python 3.10 and UiPath.python.activities package as 1.8.1 and most recent 1.9.0-alpha as well. It shows the below error.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/d/e/9/de9275ad29c296ae1b0ef1e8dc32e70e34ef263b.png)e  
Is there anyway to achieve this in 32-bit? If yes Please mention required versions.  
 ![The image shows the properties of a Python Scope activity in UiPath, with details such as the display name, library path, path, target, timeout, version, and working folder. (Captioned by AI)](https://global.discourse-cdn.com/uipath/original/4X/2/7/2/272cc8e502924e42f949f6262d6395f6be4342b9.png)

---

<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:** [October 7, 2024, 3:10am UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/2 "2024-10-07T03:10:07Z")

</div>

@vinoth4390

Welcome to the community

As per error if you install any version •less than 3.10 then 32 bit is supported else you need to install 64 bit

Cheers

---

<div class="post-metadata">

**Author:** ![yosemitesam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yosemitesam/32/264599_2.png) [@yosemitesam](https://forum.uipath.com/u/yosemitesam)\
**Post date:** [June 16, 2025, 6:10pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/3 "2025-06-16T18:10:54Z")

</div>

I know this is an old topic, but I’m hoping I can still get some attention, as I’m seeing the same issue.

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

Further, I have Python 3.11 and 3.12 installed. I’ve tried running under both, getting the same error in each case.

When I invoke “python” I see:  
$ python  
Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 **64 bit** (AMD64)] on win32  
Type “help”, “copyright”, “credits” or “license” for more information.  
\>\>\> exit()

3.12 has similar output.

Any suggestions on getting around this? I’m just trying to implement UiPath’s example for using a Python Scope and Method: [Activities - Invoking a Python Script](https://docs.uipath.com/activities/other/latest/developer/invoking-a-python-script)

---

<div class="post-metadata">

**Author:** ![Mir.Jasimuddin](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mir.jasimuddin/32/563617_2.png) [@Mir.Jasimuddin](https://forum.uipath.com/u/Mir.Jasimuddin)\
**Post date:** [June 16, 2025, 6:31pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/4 "2025-06-16T18:31:12Z")

</div>

Hi, I faced a similar issue when working with the Python Scope and Invoke Python Method activities. The problem is likely due to the Python version you’re using.

UiPath currently supports Python versions **3.6 to 3.10** only. Since you’re using Python 3.11 and 3.12, this could be causing the integration error.

Here’s what worked for me:

1. I uninstalled the newer versions and installed **Python 3.10 (64-bit)** from the official site: [Python Release Python 3.10.0 | Python.org](https://www.python.org/downloads/release/python-3100/)
2. During installation, I made sure to check **“Add Python to PATH.”**
3. In the **Python Scope** activity, I selected **“Specify path manually”** and pointed it to the Python 3.10 executable.
4. After that, I was able to successfully load and invoke functions from my Python script using UiPath.

Hope this helps! Let me know if you need a working example script.

---

<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:** [June 16, 2025, 6:31pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/5 "2025-06-16T18:31:22Z")

</div>

Can you try in a Windows project (64-bit)?  
Can you check to have in the Path environment variables only the 64-bit path of the python.exe?  
How did you configure the Python Scope activity?  
Which are the result for **where python** in a cmd.exe console?

---

<div class="post-metadata">

**Author:** ![yosemitesam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yosemitesam/32/264599_2.png) [@yosemitesam](https://forum.uipath.com/u/yosemitesam)\
**Post date:** [June 16, 2025, 7:46pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/6 "2025-06-16T19:46:22Z")

</div>

Thanks for your reply!

I only have Python 3.11 in my PATH. My 3.11 installation is 64 bit, as I posted above. I’m building the project in UiPath Studio v2025.0.166 STS, which does not have “64 bit” as an option for new projects. Compatibility is set to “Windows”, and the language is set to “C#”.

I’m trying to recreate the UiPath demo showing how to use the Python activities, as posted above. As such, the Python Scope is configured as:

Library path: “C:\Users\name\AppData\Local\Programs\Python\Python311”  
Path: (a variable containing the library path with “Python311” appended to it).  
Target: x86

The above configuration yields the error I reported above (essentially a version mismatch error). If I set the “Target” to “x64” I get the error:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/2/6/d/26d997d6945f1d76ecc393cee9ac1d33dd5a2c23.png)

“$ where python” (in cmd shell) yields:

C:\Users\name\AppData\Local\Programs\Python\Python311\python.exe  
C:\Users\name\AppData\Local\Microsoft\WindowsApps\python.exe

Attempting to execute the second python.exe brings up a GUI installer trying to locate it on the Windows App Store, which is blocked by my organization.

---

<div class="post-metadata">

**Author:** ![yosemitesam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yosemitesam/32/264599_2.png) [@yosemitesam](https://forum.uipath.com/u/yosemitesam)\
**Post date:** [June 16, 2025, 7:52pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/7 "2025-06-16T19:52:16Z")

</div>

Thanks very much for your reply. This is likely the cause of the issue. While I’m not terribly surprised, I am disappointed. My company really doesn’t like using old versions of software.

---

<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:** [June 16, 2025, 8:02pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/8 "2025-06-16T20:02:35Z")

</div>

Use UiPath.Python.Activities.1.10.0

Configure the Python Scope as below:

Library path: `"C:\Users\your_username\AppData\Local\Programs\Python\Python311\python311.dll"`  
Path: `"C:\Users\your_username\AppData\Local\Programs\Python\Python311"`  
Target: x64  
Version: Python \>=3.10

In below case is for Python.3.13.3 and it worked.

 ![The image shows a UIPath interface focused on a Python Scope activity with configured settings for a Python environment, including the library path to "C:rogram Filesython313ython313.dll" and version constraints set to Python > 3.10. (Captioned by AI)](https://global.discourse-cdn.com/uipath/original/4X/0/5/d/05d2aeba3db13bebdcc6c3b63fb2b9271bfff485.png)

---

<div class="post-metadata">

**Author:** ![yosemitesam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yosemitesam/32/264599_2.png) [@yosemitesam](https://forum.uipath.com/u/yosemitesam)\
**Post date:** [June 16, 2025, 8:17pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/9 "2025-06-16T20:17:03Z")

</div>

Thank you very much, Marian! That got me a bit farther. It’s still failing (now can’t find the method within the Python class) but you’ve got me on the right track.

---

<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:** [June 16, 2025, 8:25pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/10 "2025-06-16T20:25:59Z")

</div>

Cannot find method from the class is from Python code itself or maybe UiPath cannot load your library.  
Test without UiPath and check if you can replicate the same.

Try to import libraries as below in your Python code at the beginning:

```auto
try:
    sys.path.append(os.path.dirname(os.path.realpath( __file__ )))
    import pytesseract
    from PIL import Image
except Exception as e:
    #print(f"Error during imports: {e}")
    raise

```

Reference: [Activities - Load Python Script](https://docs.uipath.com/activities/other/latest/developer/load-script)

_Example:_

```auto
import sys
import os

try:
    sys.path.append(os.path.dirname(os.path.realpath( __file__ )))
    import pytesseract
    from PIL import Image
except Exception as e:
    #print(f"Error during imports: {e}")
    raise

# Set the tesseract executable path
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

def rotate_and_correct_image(In_FilePath):
    try:
        In_OutputPath = In_FilePath
        original_image = Image.open(In_FilePath)
        osd = pytesseract.image_to_osd(original_image)
        #print("OSD Data:", osd) # Debug print
        rotation_angle = int([line.split(":")[1].strip() for line in osd.split("\n") if "Rotate" in line][0])
        #print("Rotation Angle:", rotation_angle) # Debug print
        corrected_image = original_image.rotate(-rotation_angle, expand=True)
        corrected_image.save(In_OutputPath)
        return In_OutputPath # Return the output file path
    except Exception as e:
        return f"Error during image processing: {e}"

```

---

<div class="post-metadata">

**Author:** ![yosemitesam](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yosemitesam/32/264599_2.png) [@yosemitesam](https://forum.uipath.com/u/yosemitesam)\
**Post date:** [June 18, 2025, 7:02pm UTC](https://forum.uipath.com/t/python-scope-uipath-version-and-python-version-compatibility-issue/771744/11 "2025-06-18T19:02:33Z")

</div>

Thanks! I’m now able to call Python methods.
