Please note that Anaconda is not supported, and is not guaranteed to work. The supported Python Implementation can be found through:
Python Engine simply launches MATLAB, passes requests to MATLAB and retrieves results. Python Engine is a bridge between Python and MATLAB, it doesn't know what's happening in MATLAB. It is up to MATLAB regarding things like MATLAB Path.
As a possible workaround, try following things
- Add the path using python engine
eng.addpath(path_to_Simulink_model)
- If the addpath does not work, create pathdef.m in the working directory and add all the wanted pathes.
If you want to open Simulink model then use the following
eng.open_system(env_name,nargout=0)
If you don't want to open the model, just load the system and run it
eng.load_system(env_name)
results = eng.sim(env_name)
eng.close_system(env_name, nargout=0)