my c# code:
//Create the ScriptRuntime
engine = Python.CreateEngine();
//Create the scope for the ScriptEngine
scope = engine.CreateScope();
string pyfile = "D:\\MyAddin\\test.py";
ScriptSource source = engine.CreateScriptSourceFromFile(pyfile);
var rt = source.Execute(scope);
and my test.py:
import os
import sys
...
print("test")
...
I get no problem at build time, but at runtime VS give me a error "cannot import module "os"". Where is the error?