1
私IronPythonをVS#2015でC#.Net 3.5アプリケーションで使用しています。 私はこのトピックに関するすべての記事を読んでいますが、まだこのエラーが表示されます。私のコード:IronPython.Runtime.Exceptions.ImportException:いいえモジュールos
static void Main(string[] args)
{
var engine = Python.CreateEngine();
var searchPaths = engine.GetSearchPaths();
searchPaths.Add(@"C:\myProject\packages\DynamicLanguageRuntime.1.1.2");
searchPaths.Add(@"C:\myProject\packages\IronPython.2.7.7\lib");
searchPaths.Add(@"C:\myProject");
searchPaths.Add(@"C:\myProject\"where myfile.py exists");
engine.SetSearchPaths(searchPaths);
var mainfile = @"C:\myProject\myfile.py";
var scope = engine.CreateScope();
engine.CreateScriptSourceFromFile(mainfile).Execute(scope);
var result = scope.GetVariable("res");
// Console.WriteLine(result);
Console.ReadKey();
}
とで始まるmyfile.py:
import os
import csv
import unirest
.
.
res = "something"
は誰かが問題となる可能性が知っているでしょうか?おかげさまで