我正在尝试使用这个 repo:
https://github.com/CMU-Perceptual-Computing-Lab/MonocularTotalCapture
它需要“OpenCV 2.4.13(使用 CUDA 9.0、CUDNN 7.0 从源代码编译)”,所以我正在尝试使用 conda 安装它。我的系统上的默认 python 安装是:
(base) root@ziom-Z87-HD3:/home/ziom# python
Python 2.7.16 |Anaconda, Inc.| (default, Sep 24 2019, 21:51:30)
[GCC 7.3.0] on linux2
但是 repo 需要 python 3.5,因此我用这个命令切换到它:
alias python='/usr/bin/python3.5'
它似乎奏效了。
(base) root@ziom-Z87-HD3:/home/ziom# python
Python 3.5.2 (default, Oct 8 2019, 13:06:37)
[GCC 5.4.0 20160609] on linux
现在,它需要安装 python 3.5 和 OpenCV 2.4.13,所以我给出这个命令:
conda create -n ziomario pip python=3.5
conda activate ziomario
此时我应该安装 OpenCV 2.4.13 并给出以下命令:
conda install -c conda-forge opencv=2.4.13
但它不起作用,因为:
(ziomario) root@ziom-Z87-HD3:/home/ziom# conda install -c conda-forge opencv=2.4.13
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining @/linux-64::__glibc==2.23=0: 25%|██▌ | 1/4 [00:00<00:00, 6026.3Examining python=3.5: 50%|█████ | 2/4 [00:00<00:00, 7351.98it/s] Examining conflict for python opencv: 25%|██▌ | 1/4 [00:00<00:00, 10979.8 failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- opencv=2.4.13 -> python=2.7
Your python: python=3.5
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your CUDA driver:
- feature:/linux-64::__cuda==9.0=0
Your installed CUDA driver is: 9.0
Opencv=2.4.13 需要 python=2.7,但 repo 需要 python 3.5。我不知道该怎么办。