Setup Python Environment
Sets up a Python virtual environment with dependencies from a GitHub repository or requirements file.
Category: Python Execution · Group: General · Activity name: SetupPythonEnvironment

Example
pythonPath = SetupPythonEnvironment("<venvPath>", githubToken="<githubToken>", githubUrl="<githubUrl>", branch="<branch>", repoPath="<repoPath>", requirementsPath="<requirementsPath>", interpreterPath="<interpreterPath>")
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| GitHub Access Token | string | Personal access token for private repositories. Leave empty for public repositories. | ||
| GitHub Repository URL | string | The URL of the GitHub repository to clone (e.g., https://github.com/user/repo). Leave empty if using an existing local requirements file. | ||
| Branch Name | string | Git branch to checkout after cloning (e.g., main, develop, feature/xyz). Defaults to the repository's default branch if not specified. | ||
| Repository Clone Path | string | Absolute path where to clone the repository (e.g., /tmp/my-project). Required when githubUrl is provided. | ||
| Virtual Environment Path | string | Yes | Path where the virtual environment should be created. Can be absolute (e.g., /tmp/my-project/venv) or relative (e.g., ./venv). | |
| Requirements File Path | string | Path to requirements.txt file. Can be relative to repoPath (e.g., requirements.txt) or absolute path. | ||
| Python Interpreter Path | string | Path to the Python interpreter to use for creating the virtual environment (e.g., /usr/bin/python3.9, python3). Defaults to 'python3' if not specified. |
Outputs
| Name | Type | Description |
|---|---|---|
| pythonPath | string | Path to the Python executable in the created virtual environment. |