Class PipManager

Constructors

Methods

  • Checks if multiple Python packages are installed.

    Parameters

    • pythonPath: string = "python"

      The Python executable to use (defaults to "python").

    • packageNames: string[]

      An array of package names to check.

    Returns Promise<boolean>

    A Promise that resolves to true if all packages are installed, false otherwise.

  • Install a Python package.

    Parameters

    • packageName: string

      The package name to install.

    • pythonPath: string = "python"

      The Python executable to use (defaults to "python").

    Returns Promise<void>

  • Installs multiple Python packages using pip.

    Parameters

    • packageNames: string[]

      An array of package names to install.

    • pythonPath: string = "python"

      The path to the Python executable. Defaults to "python".

    Returns Promise<void>

    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.

    Parameters

    • requirementsFilePath: string

      The path to the requirements file containing package specifications.

    • pythonPath: string = "python"

      The path to the Python executable. Defaults to "python".

    Returns Promise<void>

    A Promise that resolves when all packages from the requirements file are installed successfully, or rejects if there's an error.

  • Checks if a Python package is installed.

    Parameters

    • pythonPath: string = "python"

      The Python executable to use (defaults to "python").

    • packageName: string

      The package name to check.

    Returns Promise<boolean>

    A Promise that resolves to true if the package is installed, false otherwise.

  • List installed packages (pip freeze).

    Parameters

    • pythonPath: string = "python"

      The Python executable to use (defaults to "python").

    Returns Promise<string[]>

  • Uninstall a Python package.

    Parameters

    • packageName: string

      The package name to uninstall.

    • pythonPath: string = "python"

      The Python executable to use (defaults to "python").

    Returns Promise<void>