How to call python3 in MATLAB?

조회 수: 1 (최근 30일)
Houghton
Houghton 2016년 7월 19일
댓글: Jim Prall UofT 2022년 3월 22일
Hi,
I am using python3. I need to call python3 in MATLAB. I found this page http://www.mathworks.com/help/matlab/getting-started_buik_wp-3.html
It said "MATLAB supports versions 2.7, 3.3, and 3.4"
Is it possible for me to call python3 in MATLAB?
If yes, How to call python3 in MATLAB?
Thanks
  댓글 수: 1
Jim Prall UofT
Jim Prall UofT 2022년 3월 22일
I also have this question. I am just trying out the features for calling Python from MATLAB. The help pages say to call 'pyenv' in MATLAB, which in my case reports the version of 'python' which is Python 2.7.
Our servers have both Python v.2 (accessed via the command name 'python') and Python v.3.x (accessed as 'python3')
Is there a way in MATLAB to specify which major version of Python you want to invoke? For instance, by analogy with the 'pip3' command, is there / could there be a MATLAB function 'py3' invoked as 'py3.modulename' ?

댓글을 달려면 로그인하십시오.

답변 (2개)

Bo Li
Bo Li 2016년 7월 19일
What is the output when you run "python3 --version"? There should be both major number and minor number like Python 3.2.*, Python 3.3.* etc.
  댓글 수: 1
Houghton
Houghton 2016년 7월 19일
I installed python version 3.5.2

댓글을 달려면 로그인하십시오.


Houghton
Houghton 2016년 7월 19일
I installed python version 3.5.2

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by