参考链接:https://blog.csdn.net/yuanlulu/article/details/79017116

从x86_64 + ubuntu18.04 + python3.5中import cv2(opencv4.1), 遇到以下错误:

ImportError: libSM.so.6: cannot open shared object file: No such file or directory

ImportError: libXrender.so.1: cannot open shared object file: No such file or directory

ImportError: libXext.so.6: cannot open shared object file: No such file or directory

ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

解决方案:

apt-get update

apt-get install libsm6

apt-get install libxrender1

apt-get install libglib2.0-dev

apt-get install libxext-dev

python中import cv2遇到的错误及安装方法的更多相关文章

  1. python在linux中import cv2问题

    python中import cv2遇到的错误及安装方法标签 1 错误: ImportError: libXext.so.6: cannot open shared object file: No su ...

  2. (原)python中import caffe提示no module named google.protobuf.internal

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5993405.html 之前在一台台式机上在python中使用import caffe时,没有出错.但是 ...

  3. python中import和from...import...的区别

    python中import和from...import...的区别: 只用import时,如import xx,引入的xx是模块名,而不是模块内具体的类.函数.变量等成员,使用该模块的成员时需写成xx ...

  4. Python中import的使用方法

    源文出处: "import"的本质参照: Python中import机制 python导入自定义模块和包

  5. Python中模拟enum枚举类型的5种方法分享

    这篇文章主要介绍了Python中模拟enum枚举类型的5种方法分享,本文直接给出实现代码,需要的朋友可以参考下   以下几种方法来模拟enum:(感觉方法一简单实用) 复制代码代码如下: # way1 ...

  6. python中执行该文件,就调用 mian 方法

    代码: test.py import student def main(): st = student.student(1001, 'tommy', 18) st.sing() st.dance() ...

  7. 在Python中使用glob模块查找文件路径的方法

    在Python中使用glob模块查找文件路径的方法 glob模块是最简单的模块之一,内容非常少.用它可以查找符合特定规则的文件路径名.跟使用windows下的文件搜索差不多.查找文件只用到三个匹配符: ...

  8. Python中多个列表与字典的合并方法

    Python中多个列表与字典的合并方法 1多列表的合并 1)a+=b a=['] b = ['] a += b print(a) >>>['] 2) a.extend(b) a=[' ...

  9. Python中elasticsearch插入和更新数据的实现方法

    Python中elasticsearch插入和更新数据的实现方法 这篇文章主要介绍了Python中elasticsearch插入和更新数据的实现方法,需要的朋友可以参考下 首先,我的索引结构是酱紫的. ...

随机推荐

  1. LoadRunner脚本编写之一

    LoadRunner脚本编写之一 性能测试工程师要懂代码么?答案是必须的.好多测试员认为在loadrunner中编写脚本很难很牛X ,主要是大多测试人员并未做过开发工作,大学的那点程序基础也忘记的差不 ...

  2. IOS input框轻点无效修复方法

    FastClick.prototype.focus = function(targetElement) { targetElement.focus();//加入这一句话就OK了 };

  3. java源码-LinkedHashMap类设计

    LinkedHashMap 继承于 hashMap LinkedHashMap .Entry 继承 HashMap.Node 继承 Map.Entry类 LinkedHashMap .Entry 该E ...

  4. spring boot configuration annotation processor not found in classpath

    <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spri ...

  5. Win10资源管理器始终使用详细视图模式

    Win10系统中使用资源管理器时,如果文件夹里有音乐文件就自动切换视图模式为音乐模式,这样有时确实很头疼,看不到文件的大小等信息. 解决的办法如下: 新创建FolderType = NotSpecif ...

  6. Python基于回溯法解决01背包问题实例

    Python基于回溯法解决01背包问题实例 这篇文章主要介绍了Python基于回溯法解决01背包问题,结合实例形式分析了Python回溯法采用深度优先策略搜索解决01背包问题的相关操作技巧,需要的朋友 ...

  7. localStorage基本了解及使用

    以下内容来自: https://www.cnblogs.com/st-leslie/p/5617130.html  感谢大佬的分享 一.什么是localStorage.sessionStorage 在 ...

  8. H5中调起微信这么实现,如果未安装则提示未安装

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name ...

  9. SLAM+语音机器人DIY系列:前言

    ------SLAM+语音机器人DIY系列[目录]快速导览------ 第1章:Linux基础 1.Linux简介 2.安装Linux发行版ubuntu系统 3.Linux命令行基础操作 第2章:RO ...

  10. Cobalt Strike DLL用于永恒之蓝注入

    PDF下载:blob:https://www.52stu.org/9afe109c-f95f-4cb3-a180-90d469a1d001 我们在对存在MS17010的漏洞主机进行DLL注入的时候,一 ...