Soenneker.Python.Util 11.0.503

Prefix Reserved
dotnet add package Soenneker.Python.Util --version 11.0.503
                    
NuGet\Install-Package Soenneker.Python.Util -Version 11.0.503
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Python.Util" Version="11.0.503" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Python.Util" Version="11.0.503" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Python.Util" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Python.Util --version 11.0.503
                    
#r "nuget: Soenneker.Python.Util, 11.0.503"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Python.Util@11.0.503
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Python.Util&version=11.0.503
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Python.Util&version=11.0.503
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Python.Util

Locates a specific Python major/minor version and can install it through the host's package manager.

Installation

dotnet add package Soenneker.Python.Util

Registration

using Soenneker.Python.Util.Registrars;

services.AddPythonUtilAsSingleton();

Locate an interpreter

using Soenneker.Python.Util.Abstract;

IPythonUtil python = serviceProvider.GetRequiredService<IPythonUtil>();

string path = await python.EnsureInstalled(
    minVersion: "3.12",
    installIfMissing: false,
    cancellationToken: cancellationToken);

Despite the parameter's compatibility name, the version is matched by exact major/minor: 3.12 accepts any Python 3.12 patch release, not Python 3.13.

The lookup checks common launchers, the GitHub/Azure hosted-tool cache on Windows, and the Windows Python registry. It returns the interpreter path reported by the matching installation.

Resolve a command directly

string defaultPython = await python.GetPythonPath("python", cancellationToken);
string windowsPython = await python.GetPythonPath("py -3", cancellationToken);
string explicitPython = await python.GetPythonPath(
    @"C:\Python312\python.exe",
    cancellationToken);

GetPythonPath runs the supplied interpreter or launcher and returns sys.executable; it does not enforce a version.

Install when missing

Set installIfMissing: true, or call TryInstall(new Version(3, 12), cancellationToken), to invoke the platform package manager:

  • Windows: winget, falling back to Chocolatey.
  • macOS: Homebrew.
  • Linux: apt-get through sudo.

Installation changes the machine and may require elevated permissions, accepted package sources, and network access. Prefer installIfMissing: false in application code unless machine provisioning is explicitly intended. Cancellation stops the active process call but does not roll back package-manager changes already made.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Python.Util:

Package Downloads
Soenneker.DocTr.Util

A cross-platform docTR OCR utility for .NET using Python.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.503 0 11/14/2026
11.0.502 78 11/12/2026
11.0.501 77 11/11/2026
11.0.499 49 11/11/2026
11.0.498 64 11/11/2026
11.0.496 66 11/11/2026
11.0.495 54 11/11/2026
11.0.494 58 11/11/2026
11.0.493 57 11/11/2026
11.0.492 53 11/11/2026
11.0.491 71 11/11/2026
11.0.490 209 11/3/2026
11.0.489 99 11/3/2026
11.0.488 97 11/3/2026
11.0.487 93 11/3/2026
11.0.486 96 11/3/2026
11.0.484 104 11/3/2026
11.0.483 96 11/3/2026
11.0.482 98 11/3/2026
11.0.481 92 11/3/2026
Loading failed

Update dependency Soenneker.Utils.Json to 11.0.2789 (#772)