Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error start matlab process in matlab engine for python #64

Open
newman2333 opened this issue Apr 28, 2023 · 4 comments
Open

error start matlab process in matlab engine for python #64

newman2333 opened this issue Apr 28, 2023 · 4 comments

Comments

@newman2333
Copy link

when try to Open a MATLAB Terminal , got a error message :error start matlab process in matlab engine for python ,and can not open a matlab terminal

@jhcole
Copy link

jhcole commented May 3, 2023

I am getting the same error. It flashes quickly then goes away, but I was able to get a screenshot.
image

I'm using Python 3.10, Matlab 2023a, and matlabengine 9.14.2, with VS Code extension MATLAB 1.0.1 from MathWorks.

I am able to run the Matlab Engine getting started example without errors.

$ python
Python 3.10.11 (main, Apr  5 2023, 14:15:10) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matlab.engine
>>> eng = matlab.engine.start_matlab()
>>> eng.sqrt(4.0)
2.0
>>> eng.quit()
>>>

@cnzhaoliang
Copy link

hello,I am not sure if you have downloaded "matlabengine" correctly, if not, you can install it by >cd "matlabroot\extern\engines\python",>python -m pip install . I have solved the problem by installing this module with two lines of command.

@ZaidaEMtzMo
Copy link

ZaidaEMtzMo commented Nov 28, 2023

Were you able to solve this?
I am getting the same error:
image
As @jhcole mentioned, I followed all the instructions from Matlab to install the Matlab Engine for Python; but I had to do it in non-default folders, so I followed these other instructions and added the installation path to the $PYTHONPATH environment variable.

After doing that, I was able to open and run Matlab stuff from Python, but I still had the same error when trying to open a Matlab terminal...

I am running:

  • Ubuntu 20.04.6 LTS
  • Python 3.8.10
  • Matlab 9.11.0.1837725 (R2021b) Update 2

@kataklasm
Copy link

Ensure your MATLAB is in your PATH, your Python is less than or equal version 3.11. We've encountered this when one of this wasn't the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants