Unable to load custom python package
Show older comments
Hey guys.
I have a problem when trying to use a python script in a matlab file. I've followed the instructions in the DOC "Call User-Defined Python Module" and the tutorial works.
But I have a custom package that I need to use. But I don't even get the file to run when I add the package import. My Python file looks like this:
from package import * %Import custom package from installed Conda environment
def solve(var):
do stuff
%Calculation using the functions defined in cstmpkg
return var %Return value to matlab for further processing
Is there anything that I did wrong? I installed python with conda and changed pyversion to the corresponding conda environment where the package was installed. Or is Matlab unable to use custom Packages? That would answer the question, but it would be sad, because that would make the feature kinda useless.
Thanks for the Ideas/answers.
Accepted Answer
More Answers (0)
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!