Skip to content

Example using pythonnet to run Python from C# with or without virtual environments in Windows, Mac, or Linux

License

Notifications You must be signed in to change notification settings

jchristn/PythonLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PythonLoader

PythonLoader is a simple example of using the fantastic Python.NET library on Windows, Mac, and Linux.

Usage

Two .cs files are present in this code: ProgramNoVenv.cs and ProgramVenv.cs. The first does not use virtual environments, whereas the second one does.

Set either file's entrypoint to Main, build, and then run. For the virtual environment version, a virtual environment will be created in bin/Debug/net8.0/venv, and will be reused on subsequent invocations.

Helpful Links

The following links were helpful in writing this example and are here for your reference:

About

Example using pythonnet to run Python from C# with or without virtual environments in Windows, Mac, or Linux

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published