自己的解决办法:

我的报错是lib中缺少.so.56,于是我从

https://anaconda.org/conda-forge/icu/files

里面下载了放到lib中,python就能正常import cv2了。

再放上比较靠谱的其他人的办法:

https://github.com/conda-forge/geopandas-feedstock/issues/21

It looks like you have the usual "multiple channes" problem. Please take a look at http://conda-forge.github.io/docs/conda-forge_gotchas.html#using-multiple-channels and let us know if that fixes it for you. (Closing this for now but feel free to ask further questions here in case you are in doubt.)

https://conda-forge.org/docs/conda-forge_gotchas.html#using-multiple-channels

Using multiple channels

It is quite common to install a package from conda-forge and,when trying to use it,see an error like (OS X example):

ImportError: dlopen(.../site-packages/rpy2/rinterface/_rinterface.so, 2): Library not loaded: @rpath/libicuuc.54.dylibReferenced from: .../site-packages/rpy2/rinterface/_rinterface.soReason: image not found

That happens because either the correct version of icu,or any other package in the error,is not present or the package is missing altogether.

Once can confirm by issuing the command conda list and searching for the package in question.

Why that happens?

The conda-forge and defaults are not 100% compatible.In the example above it is known that defaults uses icu 54.* while conda-forge relies on icu 56.*,that mismatch can lead to errors when the install environment is mixing packages from multiple channels.

Note: All of conda-forge software pinning can be found at: https://github.com/conda-forge/staged-recipes/wiki/Pinned-dependencies

How to fix it?

Newer conda versions introduced a channel priority feature.See https://conda.io/docs/channels.html for more information.

One possible solution is to add the conda-forge channel on top of defaults in your condarc file when using conda-forge packages.This will ensuring that all the dependencies will come from the conda-forge channel.Here is how a .condarc file would look like:

$ cat .condarc
channels:- conda-forge- defaults

In addition to the channel priority we recommend to always install your packages inside a new environment instead the root environment from anaconda/miniconda.Using envs make it easier to debug problems with packages and ensure the stability of your root env.

https://conda.io/docs/user-guide/tasks/manage-channels.html

Managing channels

Different channels can have the same package, so conda must handle thesechannel collisions.

There will be no channel collisions if you use only the defaults channel.There will also be no channel collisions if all of the channels you use onlycontain packages that do not exist in any of the other channels in your list.The way conda resolves these collisions matters only when you have multiplechannels in your channel list that host the same package.

Before conda 4.1.0

Before conda 4.1.0 was released on June 14, 2016, when two channelshosted packages with the same name, conda installed the packagewith the highest version number. If there were two packageswith the same version number, conda installed the one with thehighest build number. Only if both the version numbers and buildnumbers were identical did the channel ordering make adifference. This approach had 3 problems:

  • Build numbers from different channels are not comparable.Channel A could do nightly builds while Channel B does weeklybuilds, so build 2 from Channel B could be newer than build 4from Channel A.
  • Users could not specify a preferred channel. You might considerChannel B more reliable than Channel A and prefer to getpackages from that channel even if the B version is older thanthe package in Channel A. Conda provided no way to choose thatbehavior. Only version and build numbers mattered.
  • Build numbers conflicted. This is an effect of the other 2problems. Assume you were happily using package Alpha fromChannel A and package Bravo from Channel B. The provider fromChannel B then added a version of Alpha with a very high buildnumber. Your conda updates would start installing new versionsof Alpha from Channel B whether you wanted that or not. Thiscould cause unintentional problems and a risk of deliberateattacks.

After conda 4.1.0

By default, conda now prefers packages from a higher prioritychannel over any version from a lower priority channel.Therefore, you can now safely put channels at the bottom of yourchannel list to provide additional packages that are not in thedefault channels, and still be confident that these channels willnot override the core package set.

Conda collects all of the packages with the same name across alllisted channels and processes them as follows:

  1. Sorts packages from highest to lowest channel priority.
  2. Sorts tied packages—same channel priority—from highest tolowest version number.
  3. Sorts still-tied packages—same channel priority and sameversion—from highest to lowest build number.
  4. Installs the first package on the sorted list that satisfiesthe installation specifications.

To make conda use the old method and install the newest versionof a package in any listed channel:

  • Add channel_priority: false to your .condarc file.

    OR

  • Run the equivalent command:

    conda config --set channel_priority false
    

Conda then sorts as follows:

  1. Sorts the package list from highest to lowest version number.
  2. Sorts tied packages from highest to lowest channel priority.
  3. Sorts tied packages from highest to lowest build number.

Because build numbers from different channels are notcomparable, build number still comes after channel priority.

The following command adds the channel “new_channel” to the topof the channel list, making it the highest priority:

conda config --add channels new_channel

Conda now has an equivalent command:

conda config --prepend channels new_channel

Conda also now has a command that adds the new channel to thebottom of the channel list, making it the lowest priority:

conda config --append channels new_channel

另外icu的开源库在:

https://github.com/conda-forge/icu-feedstock

ImportError: libicui18n.so.56 and/or libicui18n.so.58 when importing cv2相关推荐

  1. 【Qt】启动QtCreator时报错:Cannot mix incompatible Qt library (version ) with this library (version...

    1.问题描述 当启动QtCreator时报错(我的Qt版本是Qt5.6.3): Cannot mix incompatible Qt library (version 0x50603) with th ...

  2. qt程序部署在linux,Qt应用打包发布,部署真正的Qt程序LinuxWindows-Go语言中文社区...

    最近在发布Qt应用时遇到了一些困难,Windows还好,在Linux上面发布遇到了不少的麻烦(实际Linux应该简单才对),经过在网络搜索发现帖子不少,但都比较片面,现把Qt应用程序在Linux&am ...

  3. linux用于开发qt java_Linux下Qt程序的打包发布

    为便于描述,我们这里假设生成的程序名称为test(即要发布的程序名称) 方法一: 1. QtCreate使用Release版本编译 将编译后生成的可执行程序(如:test)复制到一个空目录下 2.使用 ...

  4. QT5引用库出错即解决

    QT5引用库出错即解决 先看错误: /usr/bin/ld: warning: libicui18n.so.56, needed by //opt/Qt5.10.0/5.10.0/gcc_64/lib ...

  5. Ubuntu下VSCode调试C++程序以及opencv库和Qt5库

    1.自述 自己用VSCode已经三年多了,大多数是写python程序,偶尔也写C++程序,但也不复杂,也不牵扯其他第三方库,就算牵扯第三方库,也大多是先写好CMakeLists文件,然后用标准的cma ...

  6. ubantu下QT连接数据库mysql

    ===我本想利用QTcreator连接数据库,然后交叉编译,在运行到arm板子上面,由于Qtcreator的版本是4.8.5,它不像QT5版本集成了很多kit或者编译工具gcc,所以,在使用QTcre ...

  7. RGBD三维重建——SeamlessTex运行环境配置(采坑指南)

    文章链接:Seamless Texture Optimization for RGB-D Reconstruction Github链接:fdp0525/SeamlessTex 采坑准备 安装cere ...

  8. pyqt 服务器mysql_PyQt5 中调用MySql接口失败 ( QSqlDatabase 组件) 在Linux环境下如何修改...

    最近在跑下面这么一个代码,怎么跑都无法连通服务器,如下: #-*- coding: utf-8 -*- '''[简介] PyQt5中 处理database 例子''' importsysfrom Py ...

  9. 解决Notepad--在ubuntu16.04无法运行问题

    支持国货 1.下载notepad--: 下载地址:https://gitee.com/cxasm/notepad--/releases/tag/v1.18 开源地址:ndd: notepad--是一个 ...

最新文章

  1. kaggle notebook在git push时附带用户民和密码(一行搞定,全部写在一行中)
  2. Taro+react开发(46)taro中环境判断
  3. python3.6.8安装失败_centos7编译安装Python 3.6.8 后用pip3出现SSL未配置问题(import ssl失败)解决方法...
  4. NE2018届校招内推笔试——数据挖掘
  5. 关于 nohup 执行命令以后 需要再按回车才能起效的解决办法
  6. 08flask中get和post请求。
  7. C语言字符型数据scanf,scanf()函数如何输入字符型数据?
  8. UCGUI窗体管理及消息处理机制分析
  9. h5 video在微信中 全屏播放 退出后的坑
  10. C语言 三子棋 游戏
  11. jsp快递信息管理系统
  12. 如何渲染精美3D PCB图
  13. 《数论概论》读书笔记(第二章)勾股数组
  14. 在二维空间中有许多球形的气球。对于每个气球,提供的输入是水平方向上,气球直径的开始和结束坐标。由于它是水平的,所以纵坐标并不重要,因此只要知道开始和结束的横坐标就足够了。开始坐标总是小于结束坐标。
  15. 怎么在手机上做文字长图?云便签可将文字生成长图并分享
  16. 什么是连接池,其工作原理是什么?
  17. ReID:通用性能评价标准
  18. oracle数据库更换字符集(AL32UTF8--> ZHS16GBK)
  19. 2020年需要学习的十大按需编程语言
  20. IFR:2020年全球专业服务机器人市场达到67亿美元

热门文章

  1. 为什么云服务器没西南的_去年“双11“我买的那台云服务器
  2. mysql数据库密码为空_注意MySQL数据库用户root密码为空
  3. 数据结构关键路径_数据结构与算法之关键路径_一点课堂(多岸学院)
  4. c2000 汇编语言指令,C2000系CMD文件的配置理解
  5. mini2440:最简单的嵌入式linux驱动程序模块,mini2440:最简单的嵌入式Linux驱动程序模块 解决找不到mini2440……sample...
  6. k8s 手动恢复redis 集群_二进制手动部署k8s-1.14高可用集群(二、集群部署)
  7. 被一帮小姐姐围着是什么感觉?
  8. Cell发文!施一公科研团队取得重大突破
  9. 干货|吴恩达Coursera课程教你学习神经网络!
  10. 2017年终奖发放,程序员人均11776元排名第一!