question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Trying to use too many libraries in the same python notebook/kernel seems to cause problems The simplist reproducible case is below https://www.kaggle.com/kmader/library-overload

basically in any new kernel, loading tensorflow will fail if too many other libraries are loaded before

import numpy as np
import SimpleITK as sitk
import cv2
import matplotlib.pyplot as plt
import tensorflow as tf

A real notebook showing the problem is here (also justifying why all the different libraries were needed) https://www.kaggle.com/kmader/x-ray-patient-scan-registration

Seems to have come up before with cv2 and torch (https://github.com/pytorch/pytorch/issues/2083) and tensorflow models (https://github.com/tensorflow/models/issues/523)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
crawforc3commented, May 1, 2018

Thanks @kmader

If you import Tensorflow before any other libraries, does it resolve the issue?

2reactions
kmadercommented, May 1, 2018

yes, both notebooks are now working well, it is a very strange error though

Read more comments on GitHub >

github_iconTop Results From Across the Web

dlopen: cannot load any more object with static TLS with torch ...
I am not sure if this is a PyTorch bug, a scikit-learn bug or a numba, but this used to work in scikit-learn...
Read more >
ImportError: dlopen: cannot load any more object with static TLS
tells me that this means that one of the two is not linked the right way (with -fPIC). It might be a problem...
Read more >
Jupyter dlopen cannot load any more object with static TLS
A weird problem that execute "import torch" in bash works but when you run it in Jupyter notebook: ImportError Traceback (most recent call ......
Read more >
dlopen: cannot load any more object with static TLS" - python
I am getting “ImportError: dlopen: cannot load any more object with static TLS” error message when i use import mxnet as mx on...
Read more >
dlopen: cannot load any more object with static TLS ... - Kaggle
Hi there would like to use pytorch in a new kernel but writing import torch causes ImportError: dlopen: cannot load any more object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found