Clear Filters
Clear Filters

Python enviroment automatically loads when I run app designer application

3 views (last 30 days)
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 Comments
Giovanni Pasini
Giovanni Pasini on 16 Mar 2022
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 on 16 Mar 2022
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.

Sign in to comment.

Answers (0)

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!