-1
Hello, good afternoon, sir. I am calling a file . py, which is in the scope of my application directory, and the following error is returned:
Ironpython.Runtime.Exceptions.Importaxception: 'No module named matplotlib.pyplot'
On the button call, I am asking to check the Paths of version 3.8 of Python, and yet this message appears to me.
Note the code below:
//Instanciando o PythonEngine
var MotorPython = Python.CreateEngine();
//Definido os paths da IronPython
var PathsIronPyton = MotorPython.GetSearchPaths();
PathsIronPyton.Add(@"C:\Python27\Lib");
PathsIronPyton.Add(@"C:\Python27\Lib\site-packages\");
PathsIronPyton.Add(@"C:\Python27\Lib\site-packages\matplotlib");
PathsIronPyton.Add(@"C: \Users\xxx\AppData\Local\Programs\Python\Python38 - 32\Lib");
PathsIronPyton.Add(@"C: \Users\xxx\AppData\Local\Programs\Python\Python38 - 32\Lib\site-packages\");
PathsIronPyton.Add(@"C:\Users\xxx\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\matplotlib");
MotorPython.SetSearchPaths(PathsIronPyton);
//Lendo o fonte em .py
var SourceCodePython = MotorPython.CreateScriptSourceFromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "python-statistics", "calc2.py"));
//Definido o Escopo
var ScopePython = MotorPython.CreateScope();
SourceCodePython.Execute(ScopePython);
var ClasseCalc = ScopePython.GetVariable("calc");
//Inicializando a classe calc.py
var InstanciaCalc = MotorPython.Operations.CreateInstance(ClasseCalc);
InstanciaCalc.grafCasosAtivos(true);
}
catch
{
throw;
}
Show me this error message in catch. Has anyone been able to troubleshoot the reason for this message? Note: When running in Debug mode, I can see that
When running in debug mode you can see what?
– Leandro Angelo
Ironpython.Runtime.Exceptions.Importaxception: 'No module named matplotlib.pyplot'
– Eymard Silva