필터 지우기
필터 지우기

Python enviroment automatically loads when I run app designer application

조회 수: 3 (최근 30일)
Giovanni Pasini
Giovanni Pasini 2022년 3월 15일
댓글: Giovanni Pasini 2022년 3월 16일
I would like to run an application that uses Python but I need to specify the correct python enviroment. When I launch the application it automatically loads the previous python enviroment so I can't change it from start up callback. Moreover, even if I do not call any python scripts or modules inside my application, the python enviroments automatically loads. And it loads the previous python enviroment configured in the previous MATLAB session. I can only change the python enviroment restarting MATLAB and then launch a normal .m script. This issue is particularly frustrating because I would like to compile a standalone app and it won't work if I can't solve the issue. How can I solve this problem?
  댓글 수: 3
Giovanni Pasini
Giovanni Pasini 2022년 3월 16일
EDIT 2 I'll try to move these functions outside the main code of appdesigner and put them in a different .m script that will be called by the main app.
Giovanni Pasini
Giovanni Pasini 2022년 3월 16일
EDIT 3 Moving the functions outside the main app code works. Python functions need to be called by an external .m file. In this case pyenv is not automatically activated and it is activated only at the start up when pyenv is called.

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

답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by