Error when calling Python ecCodes module from Matlab

Viewed 28

I am trying to run a Python function from Matlab, but I get an error due to a missing library (the ecCodes library). I tried to check the missing library by simply importing the module in Matlab:

>> py.importlib.import_module('eccodes')
Error using bindings><module> (line 35)
Python Error: RuntimeError: Cannot find the ecCodes library

However, I am perfectly able to import the module directly in Python through the Spyder IDE, as well as other Python modules from Matlab. Furthermore, the ecCodes module should be in the Matlab search path, as it is located in:

C:\Users\username\AppData\Local\Continuum\anaconda3\Lib\site-packages\eccodes

Calling:

>> py.sys.path

in Matlab shows that the parent-folder is in fact included:

C:\Users\username\AppData\Local\Continuum\anaconda3\Lib\site-packages

Has anyone faced similar issues when calling Python from Matlab? Thank you in advance!

0 Answers
Related