ctypes错误:libdc1394错误:无法初始化libdc1394 [英] ctypes error: libdc1394 error: Failed to initialize libdc1394

查看:1441
本文介绍了ctypes错误:libdc1394错误:无法初始化libdc1394的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的程序编译成共享库,我可以使用从Python代码使用ctypes。

I'm trying to compile my program to a shared library that I can use from within Python code using ctypes.

库使用此命令编译良好: / p>

The library compiles fine using this command:

g++ -shared -Wl,-soname,mylib -O3 -o mylib.so -fPIC [files] `pkg-config --libs --cflags opencv`

然而,当我尝试使用ctypes

However, when I try and import it using ctypes

from ctypes import *
mylib = CDLL("/path/to/mylib.so")
print mylib.test() // Expected output: Hello World

我得到以下错误:

libdc1394 error: Failed to initialize libdc1394

发生了什么事?

推荐答案

非常令人沮丧的是,没有人真正展示一个具体的解决方案。我有安装OpenCV后的这个问题。对我来说,删除此警告的最简单的解决方法是禁用此驱动程序:

Very frustrating that nobody actually shows a concrete solution. I had this issue after installing OpenCV. For me the easiest solution to remove this warning was actually to disable this driver:

sudo ln /dev/null /dev/raw1394

这篇关于ctypes错误:libdc1394错误:无法初始化libdc1394的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆