MATLAB crashes when importing Numba

조회 수: 2 (최근 30일)
Jens Renders
Jens Renders 2021년 3월 14일
답변: Imran 2022년 11월 7일
When importing a Python file or trying to call a Python function from MATLAB, that relies on the Numba library, MATLAB crashes. The shortest way to reproduce this is to just import the Numba library:
>> py.importlib.import_module('numba');
The result is that the MATLAB process freezes and that it prints:
double free or corruption (out)
in the terminal from which I launched MATLAB. What causes this? Is this a MATLAB bug or is this expected?
I am using python 3.7.4, (miniconda) on Ubuntu 18.04

답변 (1개)

Imran
Imran 2022년 11월 7일
Hello Jens,
I understand that you're facing MATLAB crashes when you're trying to import functions that relies on Numba library.
If MATLAB crashes when you try to use a function from a Python module, then this might be caused by a version conflict between libraries shipped by MATLAB and the ones required by the Python package you are trying to use. So first of all make sure the versions match.
The error message that you're getting generally comes due to MATLAB runtime cache corruption. In order to resolve this error you will need to remove your preferences directory:
For UNIX/Linux - Check in your home directory for a directory named .matlab and remove this and try re-launching MATLAB. This directory will get re-created at startup.
If this does not resolve the problem, some users have reported that setting the following variable may resolve the problem also:
set MALLOC_CHECK=0
I hope this helps.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by