Background
I was looking for something like IronPython for my C# app, but supporting numpy packages. I decided to give a try to Pythonnet. Everything works fine as long as I'm on my machine with Python installed. But when I deploy my app, and try to start it on another machine, it crashes. My idea is that, Pythonnet is not deployed inside generated exe. This mean that it is usless for me.
Here an MWE:
var input1 = new double[,] { { 15 }, { 274.5 } };
Runtime.PythonDLL = @"C:\pythonx86.3.11.2\tools\python311.dll";
PythonEngine.Initialize();
dynamic os = Py.Import("os");
dynamic sys = Py.Import("sys");
sys.path.append(os.getcwd());
dynamic test = Py.Import("Test");
int r1 = test.Test_fun(input1);
PythonEngine.Shutdown();
And Test.py
import numpy as np
import numpy.matlib
def Test_fun(x1):
Q = np.size(x1,1) # samples
return Q
Question:
Is there any way to makes the deployed .exe work on machine without python installed?