Ironpython.Runtime.Exceptions.Importaxception: 'No module named fcntl' - Ironpython C#

Asked

Viewed 80 times

-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?

  • Ironpython.Runtime.Exceptions.Importaxception: 'No module named matplotlib.pyplot'

1 answer

0


I searched and recently discovered that Ironpython does not have support for this library. Unfortunately.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.