Can't import opencv in spyder3

I’m trying to import cv2 in Spyder3 and keep getting an error:
import cv2
Traceback (most recent call last):

File “”, line 1, in
import cv2

ImportError: /usr/lib/aarch64-linux-gnu/ cannot allocate memory in static TLS block

Not sure what’s going on. It imports fine on the command prompt. I upgraded opencv 4.1.2 and its still doing that.

This sounds a known issue on opencv forum. Please check:

hi dpanchal223:
try fixed by running export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/

thank you and it is working

Hi Jeffli,

can u please guide me how to fix the above by running…

hi bmuralikrishna416
just type it on terminal before using spyder3