matlab.eng​ine.Engine​Error: Unable to launch Simple server with R2023b

14 views (last 30 days)
After installing the pre-released version of matlab R2023b compatible with Macbook M1 (Python version 3.11), I cannot lauch matlab.
import matlab.engine
eng = matlab.engine.start_matlab()
Results in
matlab.engine.EngineError: Unable to launch Simple server: Unable to launch /matlabroot/MATLAB_R2023b.app/bin/matlab
because: Peer process exited before transport type handshake. Exit status: 1

Answers (1)

Prannoy
Prannoy on 30 Jun 2023
The error you encountered suggests that there might be an issue with launching MATLAB using the matlab.engine module in Python. This error can occur due to various reasons, such as compatibility issues or incorrect installation.
To troubleshoot this issue, you can try the following steps:
  1. Ensure that you have installed the correct version of the MATLAB Engine API for Python that is compatible with MATLAB R2023b and your Macbook M1 architecture. You can check the MathWorks website or contact their support to confirm the compatibility.
  2. Verify that MATLAB R2023b is installed correctly on your Macbook M1. Make sure you can launch MATLAB directly from the MATLAB application.
  3. Check if the MATLAB engine API is properly installed and accessible from your Python environment. You can try importing the matlab.engine module without starting MATLAB to see if it throws any errors.
  4. If the issue persists, try reinstalling the MATLAB Engine API for Python. Follow the installation instructions provided by MathWorks carefully and ensure that you are using the correct installation method for your system.
  5. If you are using a virtual environment in Python, make sure the environment is activated and the MATLAB Engine API is installed within that environment.
  2 Comments
Siddharth Sahu
Siddharth Sahu on 20 Mar 2024
Ensure that you have installed the correct version of the MATLAB Engine API for Python that is compatible with MATLAB R2023b and your Macbook M1 architecture. You can check the MathWorks website or contact their support to confirm the compatibility.
  • my matlab version is R2023b and my python version is 3.11
Verify that MATLAB R2023b is installed correctly on your Macbook M1. Make sure you can launch MATLAB directly from the MATLAB application.
  • working is working perfectly
Verify that MATLAB R2023b is installed correctly on your Macbook M1. Make sure you can launch MATLAB directly from the MATLAB application.
  • I think it is installed properly
If the issue persists, try reinstalling the MATLAB Engine API for Python. Follow the installation instructions provided by MathWorks carefully and ensure that you are using the correct installation method for your system.
  • tried, still throwing the same error
If you are using a virtual environment in Python, make sure the environment is activated and the MATLAB Engine API is installed within that environment.
  • both are done
Do you have suggestions on what can be done next?
Siddharth Sahu
Siddharth Sahu on 20 Mar 2024
all information about the matlab engine version, python version path of matlab is there in the screenshot provided, please hava look

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!