Hi, I’m trying to import both pytorch and opencv with in python 2.7, but I faced with the following error.
(pytorch) root@hzxs-ai-deep-26:/mnt/storage01/xuyi/videoTag # python
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import torch
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen: cannot load any more object with static TLS
>>> torch.__version__
'0.2.0_4'
>>> exit()
or
(pytorch) root@hzxs-ai-deep-26:/mnt/storage01/xuyi/videoTag # python
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import cv2
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/envs/pytorch/lib/python2.7/site-packages/torch/__init__.py", line 53, in <module>
from torch._C import *
ImportError: dlopen: cannot load any more object with static TLS
No matter which order to import, it happens always.
my python version is 2.7.12,
torch version is 0.2.0_4
opencv with ffmpeg is 3.3.1
OS is debian 4.9.0-0.bpo.3-amd64.
Thanks a lot for any suggestion.