Conda安装3.4.1冲突规范:opencv和r-base或ncurses5.9 *

时间:2017-10-19 14:01:11

标签: r opencv anaconda

我尝试了this post

中提到的解决方案

这是终端输出(OS是Ubuntu 14.04 64位)

~$ conda install -c r r=3.4.1

Fetching package metadata .............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - opencv
  - r 3.4.1* -> r-base 3.4.1 -> ncurses 5.9*
Use "conda info <package>" to see the dependencies for each package.

我遵循终端建议:

    ~$ conda info opencv

-----------------------
file name   : opencv-2.4.2-np17py26_1.tar.bz2
name        : opencv
version     : 2.4.2
build string: np17py26_1
build number: 1
channel     : defaults
size        : 7.1 MB
arch        : x86_64
date        : 2013-03-10
license     : BSD 3-clause
license_family: BSD
md5         : 167ec5f8f898eadc9641eaa71c1c9d58
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.7*
    python 2.6*
    zlib 1.2*

opencv 2.4.2 np17py27_1
-----------------------
file name   : opencv-2.4.2-np17py27_1.tar.bz2
name        : opencv
version     : 2.4.2
build string: np17py27_1
build number: 1
channel     : defaults
size        : 7.2 MB
arch        : x86_64
date        : 2012-10-11
license     : BSD 3-clause
license_family: BSD
md5         : e6cbf983f6359d1ed868861691e619a7
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.7*
    python 2.7*
    zlib 1.2*

opencv 2.4.6 np16py26_0
-----------------------
file name   : opencv-2.4.6-np16py26_0.tar.bz2
name        : opencv
version     : 2.4.6
build string: np16py26_0
build number: 0
channel     : defaults
size        : 8.0 MB
arch        : x86_64
date        : 2013-08-07
license     : BSD 3-clause
license_family: BSD
md5         : f83a9121158188bd5275425931266488
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.6*
    python 2.6*
    zlib 1.2*

opencv 2.4.6 np16py27_0
-----------------------
file name   : opencv-2.4.6-np16py27_0.tar.bz2
name        : opencv
version     : 2.4.6
build string: np16py27_0
build number: 0
channel     : defaults
size        : 8.2 MB
arch        : x86_64
date        : 2013-08-07
license     : BSD 3-clause
license_family: BSD
md5         : c22c3a12b08c5e51ed9810dc0209115a
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.6*
    python 2.7*
    zlib 1.2*

opencv 2.4.6 np17py26_0
-----------------------
file name   : opencv-2.4.6-np17py26_0.tar.bz2
name        : opencv
version     : 2.4.6
build string: np17py26_0
build number: 0
channel     : defaults
size        : 8.0 MB
arch        : x86_64
date        : 2013-08-07
license     : BSD 3-clause
license_family: BSD
md5         : 27506a7d6fa42a222381871240a02a36
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.7*
    python 2.6*
    zlib 1.2*

opencv 2.4.6 np17py27_0
-----------------------
file name   : opencv-2.4.6-np17py27_0.tar.bz2
name        : opencv
version     : 2.4.6
build string: np17py27_0
build number: 0
channel     : defaults
size        : 8.2 MB
arch        : x86_64
date        : 2013-08-07
license     : BSD 3-clause
license_family: BSD
md5         : c31a6c8e66746966a160e2872f1c6760
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.7*
    python 2.7*
    zlib 1.2*

opencv 2.4.6 np18py26_0
-----------------------
file name   : opencv-2.4.6-np18py26_0.tar.bz2
name        : opencv
version     : 2.4.6
build string: np18py26_0
build number: 0
channel     : defaults
size        : 8.1 MB
arch        : x86_64
date        : 2014-01-29
license     : BSD 3-clause
license_family: BSD
md5         : e1db0c8b01eaa5b155994b81625ffa84
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.8*
    python 2.6*
    zlib 1.2*

opencv 2.4.6 np18py27_0
-----------------------
file name   : opencv-2.4.6-np18py27_0.tar.bz2
name        : opencv
version     : 2.4.6
build string: np18py27_0
build number: 0
channel     : defaults
size        : 8.2 MB
arch        : x86_64
date        : 2014-01-29
license     : BSD 3-clause
license_family: BSD
md5         : 945a3aa6fcd74e3021de9de4f46274c0
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.8*
    python 2.7*
    zlib 1.2*

opencv 2.4.9 np18py27_0
-----------------------
file name   : opencv-2.4.9-np18py27_0.tar.bz2
name        : opencv
version     : 2.4.9
build string: np18py27_0
build number: 0
channel     : defaults
size        : 8.9 MB
arch        : x86_64
date        : 2014-05-08
license     : BSD 3-clause
license_family: BSD
md5         : 2978366085211063867671620b6a8d1c
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.8*
    python 2.7*
    zlib 1.2*

opencv 2.4.10 np19py26_0
------------------------
file name   : opencv-2.4.10-np19py26_0.tar.bz2
name        : opencv
version     : 2.4.10
build string: np19py26_0
build number: 0
channel     : defaults
size        : 9.1 MB
arch        : x86_64
date        : 2015-01-05
license     : BSD 3-clause
license_family: BSD
md5         : 83c32af1039ebefa35e219756dd58e78
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.9*
    python 2.6*
    zlib 1.2*

opencv 2.4.10 np19py27_0
------------------------
file name   : opencv-2.4.10-np19py27_0.tar.bz2
name        : opencv
version     : 2.4.10
build string: np19py27_0
build number: 0
channel     : defaults
size        : 9.2 MB
arch        : x86_64
date        : 2015-01-05
license     : BSD 3-clause
license_family: BSD
md5         : abc16cfb98eaa4b3a0782664e08d907a
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.5.13
    numpy 1.9*
    python 2.7*
    zlib 1.2*

opencv 2.4.10 np110py27_1
-------------------------
file name   : opencv-2.4.10-np110py27_1.tar.bz2
name        : opencv
version     : 2.4.10
build string: np110py27_1
build number: 1
channel     : defaults
size        : 9.2 MB
arch        : x86_64
date        : 2015-10-06
license     : BSD
md5         : 6b4bb1b8a55a735d68c554aebf0d9970
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.6.17
    numpy 1.10*
    python 2.7*
    zlib 1.2*

opencv 2.4.10 np19py26_1
------------------------
file name   : opencv-2.4.10-np19py26_1.tar.bz2
name        : opencv
version     : 2.4.10
build string: np19py26_1
build number: 1
channel     : defaults
size        : 9.1 MB
arch        : x86_64
date        : 2015-05-27
license     : BSD
md5         : e4b190bada3d7e908dbfb209adb5eed7
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.6.17
    numpy 1.9*
    python 2.6*
    zlib 1.2*

opencv 2.4.10 np19py27_1
------------------------
file name   : opencv-2.4.10-np19py27_1.tar.bz2
name        : opencv
version     : 2.4.10
build string: np19py27_1
build number: 1
channel     : defaults
size        : 9.2 MB
arch        : x86_64
date        : 2015-05-26
license     : BSD
md5         : 82e1145622e1ba343528def4cd3d6460
noarch      : None
platform    : linux

dependencies:
    jpeg 8d
    libpng 1.6.17
    numpy 1.9*
    python 2.7*
    zlib 1.2*

opencv 3.1.0 np111py27_1
------------------------
file name   : opencv-3.1.0-np111py27_1.tar.bz2
name        : opencv
version     : 3.1.0
build string: np111py27_1
build number: 1
channel     : defaults
size        : 36.5 MB
arch        : x86_64
date        : 2016-12-20
license     : BSD 3-clause
license_family: BSD
md5         : 9040653dd93bf7e9482ec05c76ddc06b
noarch      : None
platform    : linux

dependencies:
    hdf5 1.8.*
    hdf5 >=1.8.17
    jpeg 8*
    libpng >=1.6.21,<1.7
    libtiff 4.0.*
    numpy 1.11*
    python 2.7*
    zlib 1.2.*

opencv 3.1.0 np111py34_1
------------------------
file name   : opencv-3.1.0-np111py34_1.tar.bz2
name        : opencv
version     : 3.1.0
build string: np111py34_1
build number: 1
channel     : defaults
size        : 36.5 MB
arch        : x86_64
date        : 2016-12-20
license     : BSD 3-clause
license_family: BSD
md5         : 2b824ac1d6d1290e022987ac8c71f690
noarch      : None
platform    : linux

dependencies:
    hdf5 1.8.*
    hdf5 >=1.8.17
    jpeg 8*
    libpng >=1.6.21,<1.7
    libtiff 4.0.*
    numpy 1.11*
    python 3.4*
    zlib 1.2.*

opencv 3.1.0 np111py35_1
------------------------
file name   : opencv-3.1.0-np111py35_1.tar.bz2
name        : opencv
version     : 3.1.0
build string: np111py35_1
build number: 1
channel     : defaults
size        : 36.5 MB
arch        : x86_64
date        : 2016-12-20
license     : BSD 3-clause
license_family: BSD
md5         : 6a0c25a7986fc83e6fd7b956558f2753
noarch      : None
platform    : linux

dependencies:
    hdf5 1.8.*
    hdf5 >=1.8.17
    jpeg 8*
    libpng >=1.6.21,<1.7
    libtiff 4.0.*
    numpy 1.11*
    python 3.5*
    zlib 1.2.*

opencv 3.1.0 np112py27_1
------------------------
file name   : opencv-3.1.0-np112py27_1.tar.bz2
name        : opencv
version     : 3.1.0
build string: np112py27_1
build number: 1
channel     : defaults
size        : 36.6 MB
arch        : x86_64
date        : 2017-04-11
license     : BSD 3-clause
license_family: BSD
md5         : ea63a31444efea586160844a6af08283
noarch      : None
platform    : linux

dependencies:
    hdf5 1.8.17
    jpeg 8*
    libpng >=1.6.21,<1.7
    libtiff 4.0.*
    numpy 1.12*
    python 2.7*
    zlib 1.2.*

opencv 3.1.0 np112py35_1
------------------------
file name   : opencv-3.1.0-np112py35_1.tar.bz2
name        : opencv
version     : 3.1.0
build string: np112py35_1
build number: 1
channel     : defaults
size        : 36.6 MB
arch        : x86_64
date        : 2017-04-11
license     : BSD 3-clause
license_family: BSD
md5         : f83d2ad5b29502bbadb19de046116fa8
noarch      : None
platform    : linux

dependencies:
    hdf5 1.8.17
    jpeg 8*
    libpng >=1.6.21,<1.7
    libtiff 4.0.*
    numpy 1.12*
    python 3.5*
    zlib 1.2.*

opencv 3.1.0 np112py36_1
------------------------
file name   : opencv-3.1.0-np112py36_1.tar.bz2
name        : opencv
version     : 3.1.0
build string: np112py36_1
build number: 1
channel     : defaults
size        : 36.6 MB
arch        : x86_64
date        : 2017-04-11
license     : BSD 3-clause
license_family: BSD
md5         : 4593f5ab3af8a0be8b67fb8d19b0d95b
noarch      : None
platform    : linux

dependencies:
    hdf5 1.8.17
    jpeg 8*
    libpng >=1.6.21,<1.7
    libtiff 4.0.*
    numpy 1.12*
    python 3.6*
    zlib 1.2.*

所有网址opencv均来自https://repo.continuum.io/pkgs/free/linux-64。假设这些是Anaconda中所有opencv版本的URL而不是我的机器,我是否正确?

然后我尝试

~$ conda info R

它提供了Anaconda提供的大量R版本表。值得注意的是这个输出:

    r 3.4.1 r3.4.1_0
----------------
file name   : r-3.4.1-r3.4.1_0.tar.bz2
name        : r
version     : 3.4.1
build string: r3.4.1_0
build number: 0
channel     : defaults
size        : 2 KB
arch        : x86_64
has_prefix  : False
md5         : 08866376864836652ea5a72ab9cbdb60
noarch      : None
platform    : linux
subdir      : linux-64
url         : https://repo.continuum.io/pkgs/r/linux-64/r-3.4.1-r3.4.1_0.tar.bz2
dependencies:
    r-base 3.4.1
    r-recommended 3.4.1

显然,在Anaconda R频道中可以使用R 3.4.1。然而安装失败了。我该如何修复或更好地排除故障?

1 个答案:

答案 0 :(得分:0)

您必须遵循依赖关系链,直到找到实际冲突。在这种情况下,错误是因为Python(在这种情况下为2.7)需要public holder onCreateViewHolder(ViewGroup parent, int viewType) { return new holder(new CourseRaceButton(context)); } ,而R需要ncurses 6.0.*。您应该创建一个新环境来安装R:

ncurses 5.9.*