Reload Out-of-Process Python Interpreter

조회 수: 6 (최근 30일)
Tibor Auer
Tibor Auer 2021년 1월 8일
댓글: Tibor Auer 2021년 1월 11일
I would like to dynanically change the Python Interpreter used in MATLAB.
According to this help, termination and re-specificition should work for Out-of-Process Python Interpreter. However, I receive a follwoing error message:
"Python is terminated. The environment cannot be changed in this MATLAB session. To change the environment, restart MATLAB, and then call 'pyenv'."

답변 (1개)

Pranav Verma
Pranav Verma 2021년 1월 11일
편집: Pranav Verma 2021년 1월 11일
Hi Tibor,
From the problem you have specified, I assume that you have followed the below steps mentioned in the documentation for reloading the interpreter:
terminate(pyenv)
pyenv("Version","2.7");
py.list; % Reload interpreter
pyenv
You can try with newer version of Python and see if it resolves the issue.
Thanks
  댓글 수: 1
Tibor Auer
Tibor Auer 2021년 1월 11일
Thank you for your suggestions. I already use newer Python version (3.7).

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

카테고리

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