Running Matlab using Python gives 'No module named matlab.engine' error -


i trying run matlab code using python. tried follow instructions given on mathworks page.

when trying import matlab though python, installed using pip install matlab.

however, importing matlab.engine gives error no module named 'matlab.engine'; 'matlab' not package. cannot installed using pip install engine either.

how can code running? python code i'm running below:

import matlab.engine eng = matlab.engine.start_matlab() eng.triarea(nargout=0) 

python version - 3.5

matlab version - 8.5.0.197613 (r2015a)

you need install matlab engine python, , cannot installed using pip. try instructions listed here. have listed instructions briefly below:

  1. make sure have python in path.
  2. find matlab root folder. can use matlabroot command within matlab find it.
  3. go matlab root folder in command line.
  4. cd "matlabroot\extern\engines\python" (in windows)
  5. python setup.py install

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -