> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Python virtual environment (VENV)

> How to configure and use Python virtual environments (VENV) in Itential Gateway to execute scripts with specific dependencies.

## Using the Python VENV

The *Python Virtual Environment* (VENV) is used to execute and test scripts with various versions or dependencies in a specific environment. The scripts contained in the environment are all Python scripts, which you can view under **Scripts** in the left navbar of Itential Gateway.

## Python VENV configuration

#### Open Gateway

Open **Automation Gateway**.

#### Open Configuration

Click **Configuration**.

#### Verify Python VENV settings

Click **Python** to verify Python VENV is enabled and check the location path, defined in the `properties.yml` file.

![](/_fern-img/c723805acad8593c2c8d76c84d4e6fad26f89b372b6a13976a9515e1ecee12bd.webp)

## Scripts and virtual environments

Both **Scripts** and **Virtual Environments** are contained within the Python menu. From Gateway, choose **Python** from the left navigation menu. Alternatively, click the **Use Python** link in the **Get Started** card.

![](/_fern-img/bc228f33b1b7136566b9b910ad6ac7e62536f65c5578b6c57304fb6adc2a0018.webp)

### Virtual environments

The **Virtual Environments** menu displays all virtual environments contained in the Gateway server directory, which is defined in the `properties.yml` file.

Clicking on an individual virtual environment in the sidebar menu displays the **name**, **path**, and **version** for that virtual environment.

![](</_fern-img/9fd18af7f6d0f056a8f4d26b394d517c1947487dd4b3886ea9638752cbd629d6.webp>)

### Scripts

Clicking **Scripts** shows any Python scripts that have been created or imported into Gateway.

![](/_fern-img/c3859e8cac8ba97042a075f6d975b5ca0e3f21fb999110ccd3590c996ab3622d.webp)

Select a **Virtual Environment** from the dropdown at the top to execute the script you need. If an environment is not needed, the script runs in the main Gateway environment.

![](/_fern-img/c75c982d3f200e4fe55d75e879ff100a2d2c94d695308ee8b7f77217710ad89a.webp)