美文网首页
Ubuntu 安装openCV for python

Ubuntu 安装openCV for python

作者: 谁动了我的芝麻糖 | 来源:发表于2017-05-09 10:18 被阅读0次

    命令行直接使用apt-get安装:

    # sudo apt-get install python-opencv
    # sudo apt-get install python-numpy
    

    测试是否安装成功:

    # python
    Python 2.7.6 (default, XXXX)
    [GCC 4.8.2] on linux2
    Type "help", ....
    >>> import cv
    

    如果提示错误:

    libdc1394 error: Failed to initialize libdc1394
    

    可能是版本的问题
    解决方法:

    1)  创建文件:/etc/udev/rules.d/raw1394.rules,并在其中加入一行:
           KERNEL=="raw1394", GROUP="video" 【仍然会报错】
    2)  sudo ln /dev/null /dev/raw1394 【解决】
    

    编译时出现警告:
    /sbin/ldconfig.real: /usr/lib/libnetsnmpagent.so.30 is not a symbolic link

    不用处理,只是警告。

    相关文章

      网友评论

          本文标题:Ubuntu 安装openCV for python

          本文链接:https://www.haomeiwen.com/subject/nfsbtxtx.html