Running python code from Matlab

조회 수: 7 (최근 30일)
Mallory Peterson
Mallory Peterson 2019년 3월 28일
Hello,
I am attempting to run python through Matlab on a Mac, but am running into issues when it comes to using the python3.6 version I have verses the built-in 2.7 version. I tried chagning the pyversion, but Matlab still tried to route only through the 2.7 version. Is there any good way to force Matlab to choose the 3.6 version? I tried running the following command:
system('python scrpt.py', '-echo')
Then it says import torch failed.
Then we tried running system('python3 scrpt.py', '-echo')
and it says python3 command not found .However, when I use python3 on terminal it works absolutely fine.
Could you please guide us to make python3 work while running from MATLAB as we are trying to make GUI that communicates the output of MATLAB code to a python code.
Many thanks,
Mallory

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by