iSukces.Cli.Python
1.26.713.1
dotnet add package iSukces.Cli.Python --version 1.26.713.1
NuGet\Install-Package iSukces.Cli.Python -Version 1.26.713.1
<PackageReference Include="iSukces.Cli.Python" Version="1.26.713.1" />
<PackageVersion Include="iSukces.Cli.Python" Version="1.26.713.1" />
<PackageReference Include="iSukces.Cli.Python" />
paket add iSukces.Cli.Python --version 1.26.713.1
#r "nuget: iSukces.Cli.Python, 1.26.713.1"
#:package iSukces.Cli.Python@1.26.713.1
#addin nuget:?package=iSukces.Cli.Python&version=1.26.713.1
#tool nuget:?package=iSukces.Cli.Python&version=1.26.713.1
iSukces.Cli.Python
.NET library for managing Python environments from C# code. It supports virtual environment creation, pip package installation, PyTorch and CUDA Toolkit detection, HuggingFace token handling, and process environment variable management.
Requirements
- .NET 10
- Windows with the Python
pylauncher
External tools and AI models
- Python, the
pylauncher,pip, optionaluv, and createdvenvenvironments are external dependencies supplied outside this package. - PyTorch (
torch,torchvision,torchaudio) and CUDA Toolkit are external libraries/tools installed in the Python environment or in the operating system. - HuggingFace tokens and resources, private package indexes, and AI models downloaded or used by user code are not part of this package.
- This package does not include AI models and does not guarantee the behavior of models, Python libraries, GPU drivers, or tools installed outside this package.
Installation
NuGet package:
dotnet add package iSukces.Cli.Python
Usage
Basic Python process configuration:
var result = await new Cli
{
FileName = "py",
Arguments = ["--version"]
}.WithPythonCli().RunAsync();
Console.WriteLine(result.Output);
Main features
Virtual environment management
PythonVenvrepresents a Python virtual environment. It can create environments withpy -m venvoruv venvand configure process environment variables such asVIRTUAL_ENV,PYTHONHOME, andPATH.PythonVenv.WithVenv()applies virtual environment settings to aCliprocess call.PythonCliExtension.WithPythonCli()setsPYTHONIOENCODING=utf-8for started processes.
Package installation
Installerinstalls and uninstalls pip packages in a virtual environment. It supports private indexes through--index-urland HuggingFace tokens throughHF_TOKEN.- The touched-files mechanism stores operation flags in
.prv-flagsand prevents repeated installation work when an operation has already been completed.
PyTorch and CUDA detection
PyTorchUtilsruns Python code withtorchand reads the PyTorch version, CUDA availability, and CUDA version reported by PyTorch.CudaToolkitdetects installed CUDA Toolkit versions inC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA.PythonEnvironmentInfoaggregates PyTorch and CUDA information and can create anEnvironmentUpdaterthat setsCUDA_PATHand updatesPATH.
Environment diagnostics
PythonEnvironmentProblemFinderdetects environment problems, including missing or broken PyTorch installation, missing GPU acceleration, and CUDA Toolkit version mismatch.PythonEnvironmentProblemdescribes a single problem, suggested remedy, and affected areas.
Installed Python versions
PyUtils.GetInstalledVersions()runspy -0and parses installed Python versions.PyLauncherParserparses Windows Python launcher output and detects version, architecture, and default interpreter.
Environment variables
EnvironmentUpdatermodifies environment variables, includingPATHandCUDA_PATH, with temporary activation and restoration throughIDisposable.
Dependencies
iSukces.CliToolsprovides base CLI process execution and argument collection utilities.
Build
dotnet build ..\iSukces.Cli.sln
Project configuration
- Target framework:
net10.0 - Package license: MIT
Disclaimer
This package only provides a .NET layer that starts external Python processes and tools in the operating system. It acts as a bridge/facade for tools supplied and installed outside this package.
This package does not include the executed tools, AI models, Python libraries, GPU drivers, or CUDA Toolkit, does not modify how they work, and is not responsible for their results, failures, environment requirements, resource usage, or any damages resulting from the use of those external tools.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- iSukces.CliTools (>= 1.26.713.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on iSukces.Cli.Python:
| Package | Downloads |
|---|---|
|
iSukces.Cli.Whisper
.NET process wrapper for invoking an independently installed OpenAI Whisper CLI executable from C# applications. The package builds command-line arguments and starts Whisper as a separate operating-system process; it does not include, distribute, install, download, link against, or license OpenAI Whisper, Whisper models, Python, PyTorch, CUDA, or GPU drivers. |
|
|
iSukces.Cli.Punctuate
.NET process wrapper for restoring punctuation and sentence boundaries by invoking a Python punctuation script as a separate operating-system process. The package prepares command-line arguments, exchanges input/output through temporary files, and optionally exposes helpers that can start user-side external tools such as uv or pip; it does not include, redistribute, or license Python, PyTorch, Hugging Face Transformers, SentencePiece, or the kredor/punctuate-all model. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.26.713.1 | 134 | 7/13/2026 |