How to integrate Python Code with C#.Net Core language?

ak2492 picture ak2492 · Aug 23, 2018 · Viewed 11.4k times · Source

Am trying to integrate python code in my .net core application for data analysis and some machine learning classification. How can I do this the best way?

Note: I don't want to execute scripts with IronPython. I already tried that before.

Answer

antlersoft picture antlersoft · Aug 23, 2018

If IronPython isn't a good match, Python for .Net might work for you. It integrates the CPython runtime (and thus any Python libraries, including native libraries that run under CPython) into your .Net process. .Net objects can call Python objects, and vice versa, without too much trouble. I've used it to integrate Python and C#-coded tools together behind a single WPF UI.