Need to run python script in uipath code

Hi team,

We need to run python script in ui path , used python scope activity. But we have local version 3.10 and UiPath python activity supports version less than 3.6.

Please help me to reach out from this issue.

Can you use the “invoke code” activity?

Cheers! :slight_smile:

But facing issue in python scope activity

1 Like

Not sure how to resolve this :confused:

Hello @Smitesh_Aher1

The easiest solution is to install an older version of Python that is supported by UiPath’s Python activity. You can install Python 3.6 or another compatible version alongside your existing Python 3.10 installation. This way, you can run your Python scripts within UiPath without any issues.

Create a virtual environment with Python 3.6 or an earlier supported version. This allows you to isolate your UiPath-related Python scripts and packages from your main Python 3.10 environment.

python3.6 -m venv myenv

Then, activate the virtual environment On Windows: myenv\Scripts\activate

If you must use Python 3.10 for certain tasks but want to use UiPath for automation, you can still use UiPath’s Python activity with the supported versions for tasks where the limitations won’t be a problem. For other tasks that require Python 3.10, you may have to use alternative methods or call external scripts using the Invoke Code activity.