An array of package names to check for installation.
OptionalpythonPathOverride: stringOptional. The path to the Python executable to use. If not provided, it will use the virtual environment's Python path if available, or fall back to the default Python path.
A Promise that resolves to a boolean indicating whether all specified packages are installed (true) or not (false).
Create a Python virtual environment.
The path where the virtual environment will be created.
OptionalpythonPathOverride: stringOptional Python executable path override.
Delete a virtual environment by removing its directory recursively.
The path to the virtual environment.
Ensures that a Python executable is available and sets the pythonPath for the manager. If found on the system, returns its command name. Otherwise, installs Python automatically using pyenv-win (on Windows) or pyenv (on Linux/macOS).
The Python version to ensure (default "3.9.1").
The path to the pyenv executable.
OptionalvenvPath: stringOptional path to the virtual environment. This value is optional but could be required if the process is a ElectronJS application or process executable is located in protected folders on OS. So instead of checking the system folders, use non-protected folders for venv folder and check exsistence of the venv folder.
The path to the Python executable.
Retrieves the local Python version set by pyenv.
This function executes the 'pyenv local' command to get the currently set local Python version. It uses Node.js child process to spawn a shell command and capture its output.
A Promise that resolves with a string representing the local Python version. The version string is trimmed of any leading or trailing whitespace.
Install a Python package using pip.
The package name to install.
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
Installs multiple Python packages using pip.
An array of package names to install.
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
A Promise that resolves when all packages are installed successfully, or rejects if there's an error.
Installs Python packages specified in a requirements file using pip.
The path to the requirements file containing package specifications.
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
A Promise that resolves when all packages from the requirements file are installed successfully, or rejects if there's an error.
Install a Python version using pyenv.
The version string (e.g. "3.9.1")
Check if a virtual environment exists at the specified path.
The path to the virtual environment.
A promise that resolves to true if the virtual environment exists, and false otherwise.
Checks if a specific Python package is installed.
The name of the package to check for installation.
OptionalpythonPathOverride: stringOptional. The path to the Python executable to use. If not provided, it will use the virtual environment's Python path if available, or fall back to the default Python path.
A Promise that resolves to a boolean indicating whether the package is installed (true) or not (false).
List installed packages (pip freeze).
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
List all Python versions installed via pyenv.
Execute arbitrary Python code.
The Python code to execute.
If true, streams output live to the console (defaults to false).
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
OptionalabortSignal: AbortSignalOptional AbortSignal to cancel the execution.
Execute a Python script file with optional live output streaming.
Path to the Python script.
Optional arguments to pass to the script.
If true, streams output live to the console (defaults to false).
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
OptionalabortSignal: AbortSignalOptional AbortSignal to cancel the execution.
Set the local Python version via pyenv.
The version to set as local.
Uninstall a Python package.
The package name to uninstall.
OptionalpythonPathOverride: stringOptional Python executable path override. If not provided, and venvPythonPath is set, it will use venvPythonPath, otherwise default pythonPath.
Uninstall a Python version using pyenv.
The version string to uninstall.
Checks if multiple Python packages are installed.