Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Matlab runtime in a conda environment

I have a standalone matlab exe which I can run on my laptop with the matlab runtime. I can run it from python and get the output with subprocess.check_output. Everything works fine!

The problem is that I need to run the python script inside a conda environment. I have the following error:

enter image description here

how can I make it accessible from the conda environment?

like image 504
Neabfi Avatar asked Nov 25 '25 11:11

Neabfi


1 Answers

I've solved my problem by adding the runtime in the PATH.

import os
os.environ['PATH'] = "C:\\Program Files\\MATLAB\\MATLAB Runtime\\v91\\;C:\\Program Files\\MATLAB\\MATLAB Runtime\\v91\\bin;"+os.environ['PATH']
like image 200
Neabfi Avatar answered Nov 26 '25 23:11

Neabfi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!