How do I troubleshoot a MATLAB crash when trying to use the Python Interface?
조회 수: 123 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2019년 10월 18일
편집: MathWorks Support Team
2023년 11월 6일
Whenever I try to use some Python functions in MATLAB using the Python Interface, my MATLAB crashes. What can I do to avoid such a crash?
채택된 답변
MathWorks Support Team
2023년 11월 6일
편집: MathWorks Support Team
2023년 11월 6일
If MATLAB crashes when you try to use the Python Interface for MATLAB, then this might be caused by a version conflict between libraries shipped by MATLAB and the ones required by the Python package you are trying to use.
Starting in MATLAB R2019b, you can try the out-of-process execution mode while working with the Python interface in MATLAB. This runs the Python commands in a separate process and helps avoid potential library conflicts. You can use the following command to specify out-of-process execution mode.
pyenv("ExecutionMode","OutOfProcess")
Please refer to the documentation link below to learn more about this.
https://www.mathworks.com/help/matlab/matlab_external/out-of-process-execution-of-python-functionality.html
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!