How to integrate python with uipath and which version

facing this error continuously i have tried each and every solution changed so many python version always facing path issue … 24.10.8+Branch.support-v24.10.Sha.653ecc68c3ec77c9af349466b2c3925e0dfbe4a0.653ecc68c3ec77c9af349466b2c3925e0dfbe4a0

Source: Python Scope

Message: Error initializing Python engine

Exception Type: System.InvalidOperationException

System.InvalidOperationException: Error initializing Python engine —> System.InvalidOperationException: Python instantiation exception
Python Invoker program exception:
Exception has been thrown by the target of an invocation.
at UiPath.Shared.Service.PythonResponse.ThrowExceptionIfNeeded()
at UiPath.Python.Service.PythonProxy.Initialize(String path, String libraryPath, Version version, String workingFolder)
at UiPath.Python.Impl.OutOfProcessEngine.Initialize(String workingFolder, CancellationToken ct, Double timeout)
at UiPath.Python.Activities.PythonScope.ExecuteAsync(NativeActivityContext context, CancellationToken cancellationToken)
— End of inner exception stack trace —
at UiPath.Shared.Activities.AsyncTaskNativeImplementation.BookmarkResumptionCallback(NativeActivityContext context, Object value)
at UiPath.Shared.Activities.AsyncTaskNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @javeria.fatima

Welcome to UiPath,

Check this,

OR

If helpful, mark as solution. Happy automation with UiPath

@javeria.fatima,

Follow this how to guide:

@javeria.fatima

I don’t know how to help with the specific error message you are seeing, but here are a few things that helped me get the Python Activities working:

  • Assuming you are starting from the documentation linked by other users above, note that the downloadable example projects will not work in modern versions of UiPath, because they depend on older versions of the package. Upgrading the UiPath.Python.Activities package to the latest (v1.10.0 as of today) was the most important first step for me.
  • The example project has Python paths pointing to version 3.06 or 3.12, using the typical Windows install path like C:\Users\USERNAME\AppData\Roaming\Python\PythonXXX. You will need to edit the paths configured in the example project to match your version and installation directory. I was able to get both 3.12 and 3.13 to work.
  • If you have trouble finding output files produced by your Python scripts, note the docs: “Due to a software limitation, this activity uses, by default, the installation location of the Python activity package as the run directory for the script.” You can set the “Working Folder” of the Python Scope to override this.

I hope this helps you get it working. Good luck!

@javeria.fatima

Welcome to the community

you see initialization error generally when .net runtime version is not matching or is not installed

we need .net runtime 6 or 8 based on version of package you are using..