I tried everything but nothing worked out, if someone had this issue before and solve it, could you share your solution?
>> pyenv('Version', '/Users/username/.pyenv/versions/3.8.10/bin/python', 'ExecutionMode', 'OutOfProcess');
>> pyenv
ans =
PythonEnvironment with properties:
Version: "3.8"
Executable: "/Users/aliaaafify/.pyenv/versions/3.8.10/bin/python"
Library: "/Users/aliaaafify/.pyenv/versions/3.8.10/lib/libpython3.8.dylib"
Home: "/Users/aliaaafify/.pyenv/versions/3.8.10"
Status: NotLoaded
ExecutionMode: OutOfProcess
>> py.importlib.import_module('sys')
Unable to resolve the name py.importlib.import_module.
You should not try to import modules, they are imported automatically when used.
For example, if you want to see the value of sys.copyright
, in MATLAB you’d write
py.sys.copyright
2