Azzera filtri
Azzera filtri

CPython error when running compiled application containing python module

8 visualizzazioni (ultimi 30 giorni)
Hi! I built a small Matlab standalone application (because I want to share it with others who don't have Matlab in their laptops), and inside the application I call a custom python module (a .py file which I packed along when I compiled the application).
Issue
When I test the compiled .exe file in my laptop, it works. However, it shows the following error when I try to run it in another laptop:
"Python commands require a supported version of CPython"
In the second laptop, python 3.9 is already installed (not from Microsoft Store but python.org page) and can be used in system prompt; the needed python distribution as well. Therefore, we wonder what can be the reason of that error message and what we should do?
Any help/advice will be greatly appreciated!
More information
My laptop:
  • MATLAB r2021a; python 3.8; windows 10.
  • The .exe file from folder "for redistribution" is sent to the other laptop.
The second laptop:
  • It has MATLAB r2018 (though I believe to run the .exe will not need a MATLAB installation?); python 3.9; windows 10.
  • Runtime is installed when we tried to run the .exe for the first time.

Risposta accettata

Xinzhi Jiang
Xinzhi Jiang il 24 Gen 2022
Problem solved: python 3.9 is not supported until Matlab R2021b. Installing python 3.8 in the second laptop solved the issue.
Though the answer turns out to be pretty basic (and stupid), I will keep this post in case someone has similar queries in future.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by