필터 지우기
필터 지우기

Matlab do not recongnize pyversion

조회 수: 7 (최근 30일)
Alain1305
Alain1305 2015년 7월 11일
답변: Sudhanshu Bhatt 2015년 7월 22일
I want to use Python in Matlab. I have already installed Python and I follow the instructions on Matlab web site "getting started" The first is to use pyversion to choose the version of Python to use Matlab do not recognize pyversion
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 7월 11일
Which MATLAB version are you using? The python interface is only present from R2014b onward if I recall correctly.
Robert Snoeberger
Robert Snoeberger 2015년 7월 11일
Walter, you are correct. pyversion is only present from R2014b onward.

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

답변 (1개)

Sudhanshu Bhatt
Sudhanshu Bhatt 2015년 7월 22일
Hi Alain1305,
The "pyversion" function was introduced in MATLAB R2014b and cannot be used with any prior release. MATLAB supports versions 2.7, 3.3 and 3.4 of Python.
Assuming the error occurred in MATLAB R2014b or later releases, there can be two possible reasons for this issue:
  • *Python library was installed but the executable path was not set:*In this case you can use the following commands to set the executable path:
Go to My Computer -> Properties -> Advanced -> Environment Variables and edit "Path" variable to add Python Path i.e. 'C:\<python_library>'
  • Python library is not installed: In this case reinstalling the python libraries and setting the "Path" variable might help in fixing the issue.
It might also be helpful to look at the link below describing some errors with Python integration: Undefined variable py or Function py.command
Hope this helps.
Thanks
Sudhanshu Bhatt

카테고리

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