Table of Contents

Method SetVirtualEnvironment

Namespace
Alternet.Scripter.Python
Assembly
Alternet.Scripter.Python.v10.dll

SetVirtualEnvironment(string)

Configures the Python runtime to use a specified virtual environment. This method modifies the Python system path and prefix to point to the provided virtual environment directory, ensuring that the Python runtime uses the packages and settings from the virtual environment.

public static void SetVirtualEnvironment(string venvPath)

Parameters

venvPath string

The path to the virtual environment directory. This is the path to the folder which was created using 'python -m venv someFolder' command.