python opencv error “parallel_impl.cpp (240) WorkerThread 155: Can‘t spawn new thread: res = 11“(代码片
Posted zsytony
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python opencv error “parallel_impl.cpp (240) WorkerThread 155: Can‘t spawn new thread: res = 11“(代码片相关的知识,希望对你有一定的参考价值。
这里写自定义目录标题
Bug
跑PyTorch 的深度学习的代码,遇到这个bug
[ERROR:0] global /tmp/pip-req-build-cg56sov1/opencv/modules/core/src/parallel_impl.cpp (24
0) WorkerThread 158: Can't spawn new thread: res = 11
[ERROR:0] global /tmp/pip-req-build-cg56sov1/opencv/modules/core/src/parallel_impl.cpp (24
0) WorkerThread 120: Can't spawn new thread: res = 11
[ERROR:0] global /tmp/pip-req-build-cg56sov1/opencv/modules/core/src/parallel_impl.cpp (24
0) WorkerThread 152: Can't spawn new thread: res = 11
[ERROR:0] global /tmp/pip-req-build-cg56sov1/opencv/modules/core/src/parallel_impl.cpp (24
0) WorkerThread 159: Can't spawn new thread: res = 11
[ERROR:0] global /tmp/pip-req-build-cg56sov1/opencv/modules/core/src/parallel_impl.cpp (24
0) WorkerThread 160: Can't spawn new thread: res = 11
解决办法:
在程序一开始加入如下命令即可解决
import cv2
cv2.setNumThreads(1)
以上是关于python opencv error “parallel_impl.cpp (240) WorkerThread 155: Can‘t spawn new thread: res = 11“(代码片的主要内容,如果未能解决你的问题,请参考以下文章
配置程序PHP para que muestre los errors
python opencv error “parallel_impl.cpp (240) WorkerThread 155: Can‘t spawn new thread: res = 11“
OpenCV Python Cuda CascadeClassifier错误
成功解决cv2.error: OpenCV(4.7.0) D:aopencv-pythonopencv-pythonopencvmodulesimgcodecssrcloadsave.
python opencv error “parallel_impl.cpp (240) WorkerThread 155: Can‘t spawn new thread: res = 11“
python opencv error “parallel_impl.cpp (240) WorkerThread 155: Can‘t spawn new thread: res = 11“