Python is created in the test. Py files, and have been added to the matlab search path, the file content is as follows:

In matlab, the input pyversion, results:

Matlab call python test. Py files, no error:

However, call test. Py file mysum function, lack of the problem:

Consult bosses, what is wrong with this, baidu did not find similar situation
CodePudding user response:
Excuse me, can you solve it, I also appears the question, don't know how to solveCodePudding user response:
Try to restart MATLAB?CodePudding user response:
Try y=py. Test. Mysum (int32 (10), int32) (20), take a look at this line not lineCodePudding user response:
If all sorts of reasons are tried, it should check whether your function itself has a good error ~The same directory, some functions can be found, and some found it, then I found that said no definition of the function is the function itself code is wrong, after changed with respect to OK ~