matlab error on python interpreter

2 visualizaciones (últimos 30 días)
Vince Verwaest
Vince Verwaest el 12 de Dic. de 2021
Respondida: Swastik Sarkar el 15 de Feb. de 2024
Hi,
I always get this error when I try to start up this matlab interface called rockit.
Does anyone know what this exactly means or how I can solve this?
Thanks in advance!
Kind regards

Respuestas (1)

Swastik Sarkar
Swastik Sarkar el 15 de Feb. de 2024
I understand that you have been following the documentation to use Casadi and "Python" with MATLAB Interface:
You seem to have encountered an error when attempting to access “py.rockit.matlab_path” in MATLAB, resulting in the message "Unable to resolve the name py.rockit.matlab_path". This issue seems to arise from an incompatibility with Python 2.7.
I have tried to just import rockit with Python 2.7, but it seems to error out indicating a breaking change. This could be the reason “py.rockit” is not accessible in MATLAB.
I would like to suggest the following workaround:
Select a higher version of Python form the following link:
I chose the version 3.7 of python as it is the next compatible version after 2.7 for this specific MATLAB version.
Importing into Python after installing here shows no such error.
Now if you try this in MATLAB, it works as expected.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by