I am trying to run python script from c# using Ironpython but I get error like in title.
Here's the code part. It fails while importing in python
c#
var engine = Python.CreateEngine();
var source = engine.CreateScriptSourceFromFile(templateLocation.Text + @"\test.py");
var searchPaths = engine.GetSearchPaths();
searchPaths.Add(templateLocation.Text+@"\Modules");
engine.SetSearchPaths(searchPaths);
List<String> argv = new List<String>();
argv.Add(year.Text);
argv.Add(filesLocation.Text);
argv.Add(templateLocation.Text);
argv.Add(reportLocation.Text);
var scope = engine.CreateScope();
engine.GetSysModule().SetVariable("argv", argv);
source.Execute(scope);
Python
import sys
yearForm = sys.argv[0]
fileLocation = sys.argv[1].replace("\\","/")
exeLocation = sys.argv[2].replace("\\","/")
saveLocation = sys.argv[3].replace("\\","/")
sys.path.insert(1,exeLocation+"/Modules/")
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.colors as cls
from matplotlib.colors import ListedColormap
from matplotlib.artist import setp
from pandas import ExcelWriter
import os
and let me just add that exeLocation is: C:\Users\Zlatko\name-annual-report