ImportError:dlopen:无法使用静态TLS加载任何其他对象

时间:2016-10-26 19:00:21

标签: opencv tensorflow

如果在setTimeout导出器之后导入OpenCV(cv2),我将获得ImportError

tensorflow

然而,反过来它的效果还不错:

ubuntu@ip-172-31-2-144:~/Downloads/opencv-2.4.13/release$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow.contrib.session_bundle import exporter
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so locally
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen: cannot load any more object with static TLS
>>> 

知道发生了什么事吗?

2 个答案:

答案 0 :(得分:1)

我遇到了和你一样的错误,我刚刚修复了第二次执行<?php $cdir = scandir('./projects'); foreach ($cdir as $filename){ if(preg_match('/(\w+).html/',$filename,$project_name)){ $projects_details = explode('_',$project_name[1]); } ?> <div class="container"> <nav> <ul class="content clearfix"> <li><a href="#">Welcome</a></li> <li class="dropdown"> <a href="#">Projects</a> <ul class="sub-menu" style="display: none;"> <li><a href="#">Project1</a></li> <li class="dropdown"> <a href="#">Project2</a> <ul class="sub-menu" style="display: none;"> <li class="dropdown"> <a href="#">Quality Insurance</a> <ul class="sub-menu" style="display: none;"> <li><a href="#">QA1</a></li> <li><a href="#">QA2</a></li> </ul> </li> <li class="dropdown"> <a href="#">Development</a> <ul class="sub-menu" style="display: none;"> <li><a href="#">Dev1</a></li> <li><a href="#">Dev2</a></li> </ul> </li> </ul> </li> </ul> </ul> </nav> </div> 的错误。这是一个解决方法..但我可以继续工作,所以..

答案 1 :(得分:0)

我有同样的问题,但已经解决了。 当我在jupyter笔记本上导入cv2时,显示了相同的错误,但之后,我在终端(python)上导入了cv2然后它工作了。 最后,cv2可以在jupyter笔记本上导入。 请试试。