Skip to content
Discussion options

You must be logged in to vote

Yes, this is possible today. See

https://tonybaloney.github.io/CSnakes/environments/#installing-packages-at-runtime

examples)
    .WithPython()
    .WithVirtualEnvironment(Path.Join(home, ".venv"))
    .WithPipInstaller(); // Optional - installs packages listed in requirements.txt on startup

// Environment/host builder setup

var installer = serviceProvider.GetRequiredService<IPythonPackageInstaller>();
await installer.InstallPackage("attrs==25.3.0");

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Min3r0
Comment options

Answer selected by tonybaloney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants