I’m working on Ubuntu 18.04, and I’m trying to call a python fenics script in Matlab 2019b.
Fenics 2019.1 has been installed by Anaconda3. The PythonEnvironment in Matlab is well linked to the Conda Fenics virtual environment (i did some tests calling from Matlab other python modules only installed in the fenics environment).
The python fenics script works fine from the terminal, but it already stops in Matlab at the line “from fenics import *” with the following error:
Error using log><module> (line 60)
Python Error: AttributeError: 'MexPrinter' object has no attribute 'isatty'
Error in __init__><module> (line 266)
from ufl.log import get_handler, get_logger, set_handler, set_level, add_logfile, \
Error in __init__><module> (line 1)
import ufl
Error in __init__><module> (line 135)
from . import mesh
Error in __init__><module> (line 7)
from dolfin import *
Error in mymod><module> (line 3)
from fenics import *
Error in <frozen importlib>_call_with_frames_removed (line 219)
Error in <frozen importlib>exec_module (line 728)
Error in <frozen importlib>_exec (line 630)
Error in __init__>reload (line 169)
_bootstrap._exec(spec, module)
Any ideas on how to resolve this issue?
Thanks for any help you can provide.
Note: the same behavior happens in case of “from dolfin import *”.