matlab can call python funtion now.
but when I call matplotlib ,matlab crash

 채택된 답변

Mohammad Sami
Mohammad Sami 2021년 4월 1일
편집: Mohammad Sami 2021년 4월 1일

0 개 추천

Based on this Answer from Matlab staff :
Anaconda python is not supported. You have to use the supported python implementation and ensure any necessary packages.
The python version supported also differs based on the Matlab release you are using. Check your release documentation for the version number supported.

댓글 수: 4

jun li
jun li 2021년 4월 1일
thanks.I have installed the supported cpython 3.6 .
And a new error comes out
Mohammad Sami
Mohammad Sami 2021년 4월 1일
Can you try loading python as out of process and see if you get the same error ? https://www.mathworks.com/help/matlab/matlab_external/out-of-process-execution-of-python-functionality.html#:~:text=To%20run%20out-of-process,variable%20in%20the%20Python%20environment.&text=To%20create%20this%20list%20out,execution%20mode%20to%20"OutOfProcess"%20.
Mohammad Sami
Mohammad Sami 2021년 4월 1일
The following post is also about TCL error. The cause was wrong version of TCL library. I am not sure what is the correct version for you. https://www.mathworks.com/matlabcentral/answers/525545-calling-python-function-from-matlab-when-using-python-tkinter-results-in-tclerror-can-t-find-a-usa
jun li
jun li 2021년 4월 1일
Yes when I load python as out of process ,I get the same error.Thank you very much for your answer. In fact, I also saw this message about TCL error, but I didn't quite understand what he meant at the time. After your confirmation, I can check this question again

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2021년 4월 1일

댓글:

2021년 4월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by