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.
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
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.
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?
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:
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.
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.
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.
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:
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