Effacer les filtres
Effacer les filtres

Python enviroment automatically loads when I run app designer application

3 vues (au cours des 30 derniers jours)
Giovanni Pasini
Giovanni Pasini le 15 Mar 2022
Commenté : Giovanni Pasini le 16 Mar 2022
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 commentaires
Giovanni Pasini
Giovanni Pasini le 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 le 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by