I have a python script that imports pyplot from matplotlib. When I run this python script in any situation outside of JMP (from within Spyder IDE or just via windows command line), it runs just fine. But when I launch it using JMP's Run Program functionality, or even just with OPEN, it has an import error (see below).
I've narrowed the import error down top ft2font from matplotlib and I can replicate it from within JMP:
Names Default To Here( 1 );
RP = RunProgram(
Executable( "python.exe" ),
Options( {"-c \!"from matplotlib import ft2font\!""} ),
ReadFunction( Function( {this}, Write( this << read ) ) )
);
and here's the error:
RunProgram( /*object*/ )Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
again, if I open a command prompt and run python.exe -c "from matplotlib import ft2font", I get no error. What's going on with JMP messing up python package imports? There is a very similar issue (see here) that some matplotlib users have in general with the imports in font_manager.py but those people cannot use it at all in any situation, for me it's only when calling from inside JMP.