我正在尝试安装这个 repo 。
https://github.com/CMU-Perceptual-Computing-Lab/MonocularTotalCapture
在google colab上。我是这样安装conda和opencv=2.4.13的(它需要python 2.7才能工作)。
pip install conda
!wget -c https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
!chmod +x Anaconda3-5.1.0-Linux-x86_64.sh
!bash ./Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p /usr/local
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')
!conda install -y -q -c conda-forge opencv=2.4.13
在其他软件包之间,它还需要pyEDM,所以我正在尝试安装它。我是按照这个指南安装的。
https://github.com/SugiharaLab/pyEDM/issues/1
我没有得到任何错误,直到这个命令。
!cd pyEDM; pip install .
这给了我这个错误。
Processing /content/pyEDM
ERROR: Package 'pyEDM' requires a different Python: 2.7.15 not in '>=3'
事实上,当我问我有哪些版本的Python时,它说。
!python2 --version
Python 2.7.15
!python3 --version
Python 3.6.9
!echo $PYTHONPATH
/tensorflow-1.15.0/python3.6:/env/python
所以,当我安装opencv 2.4.13时,我应该把conda安装的python版本改为3或更高的版本,否则软件包就无法安装。在我的本地机器上,我将用这个命令来做这件事。