For all Python-MATLAB interoperability features, it is always recommended that you use a Python version that is officially supported by your MATLAB release.
If switching MATLAB or Python versions is not feasible, you may be able to use a newer Python version that has not yet been qualified, depending on your workflow and release.
Python Interface (Calling Python from MATLAB)
R2025a and later
Use the "pyenv" command to specify a newer, unsupported version. Older, unsupported Python versions cannot be used. Specifying a newer, unsupported version will only throw a warning. This output is an example of the warning when using Python 3.14 with R2026a.
>> pyenv('Version','C:\Users\username\AppData\Local\Programs\Python\Python314\python.exe')
Warning: Python version 3.14 is not supported. See this topic.
ans =
PythonEnvironment with properties:
Version: "3.14"
Executable: "C:\Users\username\AppData\Local\Programs\Python\Python314\python.exe"
Library: "C:\Users\username\AppData\Local\Programs\Python\Python314\python314.dll"
Home: "C:\Users\username\AppData\Local\Programs\Python\Python314"
Status: NotLoaded
ExecutionMode: OutOfProcess
The warning indicates that this Python version has not been officially qualified for that MATLAB release. While the workflow may function correctly, compatibility and functionality are not guaranteed.
Older Python versions that reached end of life before the MATLAB release remain unsupported and result in an error rather than a warning.
R2024b and earlier
You cannot use an unsupported Python version. The pyenv command will throw an error if you specify an unsupported Python version. For example,
>> pyenv('Version','C:\Users\username\AppData\Local\Programs\Python\Python313\python.exe')
Error using pyenv
Python version 3.13 is not supported. See this topic.
MATLAB Engine API for Python Workflows (Calling MATLAB from Python)
It is not possible to use an unsupported Python version.
Other Products (Python SDK, MPS Python client, etc.)
Consult documentation specific to these products.