ImportError: dlopen: cannot load any more object with static TLS


problem occurs when using import torch.

is a very weird problem that has been discussed a lot on github, but there is no fundamental solution, and it is not just a problem with torch, but also with tensorflow.


1, switch the order of the call package, for example:

import cv2
import torch # 报错
# different order
import torch
import cv2   # ok

2. However, the above method does not work for me:


using the old brother’s method, which still makes no sense, but it works for me

Read More: