0

I am trying to import matlab.engine

I keep getting -

        cmd_obj.run()
        File "<string>", line 385, in run
        File "<string>", line 156, in _create_path_list
      RuntimeError: MATLAB R2023a installation not found. Install to default location, or add <matlabroot>/bin/maca64 to DYLD_LIBRARY_PATH, where <matlabroot> is the root of a MATLAB R2023a installation.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for matlabengine
Failed to build matlabengine
ERROR: Could not build wheels for matlabengine, which is required to install pyproject.toml-based projects 

I have the matlab app installed in the default location.

I have tried import matlab.engine I have tried python -r pip install matlabengine I am using Python 3.9

mais
  • 3
  • 2
  • Did you follow the instructions in [the docs](https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html)? The PyPI installation only works with the latest MATLAB version I think. Maybe you do t have R2023a? – Cris Luengo Jun 13 '23 at 12:52
  • I just downloaded it. It's the latest version. – mais Jun 14 '23 at 18:43

0 Answers0