首页 > 解决方案 > 如何在全新 brew 安装之前检查我是否已删除所有 python3?

问题描述

为这个菜鸟问题道歉,只是让我开始使用 macOS 的终端和 Python 进行编码。

我正在尝试完全删除 python 3.8(从 python.org 的包安装),然后使用 Homebrew 创建一个全新的安装(我被告知这是方法)。我的方法并不彻底。我首先使用了一个应用程序删除程序(CleanMyMac),并意识到它做得很糟糕。有文件和目录挥之不去,所以我开始通过终端删除它们,并慢慢意识到这已经变得多么失控。

例如,删除:

/Applications/Python3.8
/Users/5pacemanSpiff/library/caches/com.apple.python
/Library/Python/3.8
/Library/Frameworks/Python.framework
/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.python.idle.sfl
/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.python.pythonlauncher.sfl
/Library/Saved Application State/org.python.PythonLauncher.savedState
/Library/Saved Application State/org.python.IDLE.savedState
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework
/Library/Developer/CommandLineTools/usr/bin/pydoc3
/Library/Developer/CommandLineTools/usr/bin/pydoc3.8
/Library/Developer/CommandLineTools/usr/bin/python3
/Library/Developer/CommandLineTools/usr/bin/python3.8
/private/var/db/receipts/org.python.Python.PythonUnixTools-3.8.bom
/private/var/db/receipts/org.python.Python.PythonFramework-3.8.bom
/private/var/db/receipts/org.python.Python.PythonDocumentation-3.8.bom
/private/var/db/receipts/org.python.Python.PythonApplications-3.8.bom
/private/var/db/receipts/org.python.Python.PythonFramework-3.8.plist
/private/var/db/receipts/org.python.Python.PythonUnixTools-3.8.plist
/private/var/db/receipts/org.python.Python.PythonApplications-3.8.plist
/private/var/db/receipts/org.python.Python.PythonDocumentation-3.8.plist

我应该删除如下文件/目录吗?如何确定应该删除哪些其他文件?

/library/developer/commandlinetools/usr/bin/pip3

如何检查是否已删除所有必要的文件以防止与 brew 安装发生冲突?

标签: pythonpython-3.xhomebrew

解决方案


推荐阅读