在CentOS7中,如果python版本为3.x,在安装docker-compose时会报错:
ERROR: Cannot uninstall ‘PyYAML’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall
这是因为安装docker-compose需要更新PyYAML,PyYAML是由distutils安装的,而pip10以上的版本无法卸载distutils安装的软件(更新需要先卸载旧版本),所以可以把pip的版本先临时降到10以下,待安装完成后再恢复到最新版本:
pip install --upgrade --force-reinstall pip==9.0.3
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple docker-compose==1.24.1
pip install --upgrade pip
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)