필터 지우기
필터 지우기

CPython error when running compiled application containing python module

조회 수: 8 (최근 30일)
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.

채택된 답변

Xinzhi Jiang
Xinzhi Jiang 2022년 1월 24일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by