----> 1 import cv2 ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block
This is because I imported tensorflow before importing cv2.
When importing cv2 first and then tensorflow, this error disappeared.