安装docker-compse时报错 ERROR: Cannot uninstall 'PyYAML'. It is a distutils


 

安装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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM