Issues with matlab runtime on windows, python references wrong matlab
15 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm having some issues with my matlab runtime. The problem occurs when I'm to import my compiled matlab functions in python. I basically have two matlab installations in addition to matlab runtime, it is matlab 2019b and matlab 2018b. The matlab runtime is also 2019b.
However, when I'm to import the function that I have compiled it says:
RuntimeError: Could not find the directory C:\Program Files\MATLAB\R2019b\toolbox\compiler_sdk\pysdk_py
The error makes sense since it is trying to access the wrong matlab installation.
I have tried to add the matlab runtime to my system path on windows but it is not working. Also, I compiled the function on a linux machine, I do not know if that matters.
Any suggestions?
0 个评论
回答(1 个)
Antti
2024-2-20
I think this might be because in the system path environment variable, your MATLAB installation path appears before the MATLAB runtime path. Move the runtime path up, so that it appears first before any MATLAB installations.
Sometimes you might also encounter a similar error, but the missing directory is actually under the MATLAB Runtime installation directory, i.e. you see something like this:
RuntimeError: Could not find the directory C:\Program Files\MATLAB Runtime\R2019b\toolbox\compiler_sdk\pysdk_py
This is most likely because you have previously installed MATLAB Runtime for running other type of applications, such as standalone executables etc. These are generated with MATLAB Compiler, whereas software libraries, such as Python libraries, are generated with Compiler SDK. Hence, you're missing the Compiler SDK part of the MATLAB Runtime. The solution is to install the full version of MATLAB Runtime, which youc an download from this website, or use the installer file that was most likely generated when the Python library was packaged.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Python Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!