Ask Your Question

Revision history [back]

malloc: can't allocate region at import cv2

Hello,

I am running python3.9.0 and after installing cv I get the following error: It looks like it's trying to allocate memory size = 18446744071760121856 ? Please help. Thank you.

nick$ python --version Python 3.9.0 nick$ python Python 3.9.0 (v3.9.0:9cf6752276, Oct 5 2020, 11:29:23) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import cv2 Python(2622,0x11b7dadc0) malloc: can't allocate region * mach_vm_map(size=18446744071760121856) failed (error code=3) Python(2622,0x11b7dadc0) malloc: * set a breakpoint in malloc_error_break to debug init_dgelsd failed init Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/__init__.py", line 286, in <module> raise RuntimeError(msg) RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy. RankWarning: Polyfit may be poorly conditioned

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cv2/__init__.py", line 5, in <module> from .cv2 import * ImportError: numpy.core.multiarray failed to import