MATLAB crashes when importing Numba
5 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Imran
on 7 Nov 2022
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.
0 Comments
See Also
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!