0

I am using self-compiled python 3.6.3 (link) on Ubuntu 14.04. My torch is 1.0.1.post2, Tensorlayer 1.10.1. To reproduce my issue, try with

from tensorlayer.lazy_imports import LazyImport
cv2 = LazyImport("cv2")
import torch

It fails with,

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/torch/__init__.py", line 84, in <module>
    from torch._C import *
ImportError: dlopen: cannot load any more object with static TLS

My torch is installed with pip install torch torchvision. Also before compiling Python, I did apt-get install tk8.6-dev in order to make python configured with tkinter. The reason why I compile Python on my own is that shipped apt-get install-ed Python is incompatible with tkinter somehow, even with packages installed, it errs at importing too.

I wish not to change the importing order at it surely works. I hope to find out the real cause of it. Many thanks in advance!

MeadowMuffins
  • 507
  • 1
  • 5
  • 20

0 Answers0