MATLAB crashes when importing Numba

4 ビュー (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by