Matlab crashing when importing numpy

조회 수: 5 (최근 30일)
John Pevey
John Pevey 2020년 9월 17일
답변: Pierre Loicq 2021년 4월 7일
I've been running into a problem where a matlab/python code is failing. When running this simple matlab code:
function out = python_test()
py.importlib.import_module('numpy')
I get the following following error:
MATLAB: malloc.c:2396: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Other questions with this same error point to mis-allocating of variables. But I can't see how that could be the case in this very simple case.
Matlab version: 2019a
Python version 3.6.8
Linux version: CentOS Linux 8
Any help would be appreciated, thanks!

답변 (2개)

Shantanu Dwivedi
Shantanu Dwivedi 2020년 9월 21일
Please try upgrading to MATLAB R2019b. This should solve the issue.

Pierre Loicq
Pierre Loicq 2021년 4월 7일
I resolved a similar problem on Matlab 2016b with this one :
https://fr.mathworks.com/matlabcentral/answers/358233-matlab-python-interface-broken#answer_283353

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by