卸载旧版本python的安全方法

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3950819/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 13:31:08  来源:igfitidea点击:

Safe way to uninstall old version of python

pythonmacosinstallation

提问by fabrizioM

I want to update my Python framework on Mac and delete the old versions but I am not sure if is safe to

我想在 Mac 上更新我的 Python 框架并删除旧版本,但我不确定是否安全

rm -fr /Library/Frameworks/Python.framework/Versions/2.4 - 2.5 - 2.6 -3.0 etc.

Any suggestion?

有什么建议吗?

采纳答案by snapshoe

Yes, it's safe.
The Mac's system python's are in /System/Library/....
.dmg's downloaded and installed from python.org are placed in /Library/....
Don't delete the /System ones, but the /Library ones are user installed, so they should be safe to delete.

是的,它很安全。
Mac 的系统 python 位于/System/Library/....
从 python.org 下载并安装的 .dmg 放在/Library/....
不要删除 /System 的,但 /Library 是用户安装的,因此删除它们应该是安全的。

回答by Lie Ryan

No, it's not safe. Generally, don't mess with the Python that comes with your OS, many system tools depends on having a specific version of Python.

不,这不安全。通常,不要弄乱操作系统附带的 Python,许多系统工具都依赖于特定版本的 Python。