安裝docker-compse時報錯:
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
看了很多博文都解決不了問題,后來在github上找到解決辦法 原來這個報錯是因為安裝docker-compose需要更新PyYAML,PyYAML是distutils的,而pip10以上的版本無法卸載distutils的軟件(更新需要先卸載舊版本),所以可以把pip的版本先臨時降到10以下,待安裝完成后再恢復到最新版本
把pip版本降低 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: pip install --upgrade pip
還是要學好英文啊,不然看半天博文都不及github的一個issue