2017-10-19 45 views
0

我试图在this post康达安装3.4.1规格在冲突:OpenCV中和r-碱或ncurses5.9 *

这里提到的解决方案是终端输出(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.* 

所有URL的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 

显然R 3.4.1在Anaconda R通道中可用。但安装失败。我该如何解决或更好地排除故障?

回答

0

您必须关注依赖关系链,直到找到实际的冲突。在这种情况下,错误是因为Python(本例中为2.7)需要ncurses 6.0.*,而R需要ncurses 5.9.*。你应该创造一个新的环境来安装R:

conda create -n renv -c r r=3.4.1 
+0

谢谢,这就像一个魅力工作!新的renv文件是在〜/ anaconda2/envs文件夹中创建的。现在,我如何在Anaconda中使用RStudio来使用这个新创建的R环境? 我是否将此行放在我的bash.bashrc文件夹中? 导出RSTUDIO_WHICH_R =/home/[用户名]/anaconda2/envs/renv/bin/R RStudio由Anaconda安装,所以我不确定它是否可行。 –

+0

不幸的是,我不知道:-)最好问一个新的问题(但搜索,看它是否已经回答第一!)。另外,如果这个答案对你有帮助,请考虑投票或接受答案:https://stackoverflow.com/help/someone-answers – darthbith

+0

好的,我会这样做。谢谢! –