我正在尝试从我的 macOS High Sierra 中删除 Python 3.9 完整版,
我已从我的应用程序文件夹中手动删除了文件夹 python 3.9。
我已使用以下命令将其从库中删除。
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.9
当列出断开的链接时,它会显示所有断开的链接:
ls -l /usr/local/bin | grep ../Library/Frameworks/Python.framework/Versions/3.9
输出:
lrwxr-xr-x 1 root wheel 66 Jun 14 19:49 2to3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/2to3
lrwxr-xr-x 1 root wheel 70 Jun 14 19:49 2to3-3.9 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/2to3-3.9
lrwxr-xr-x 1 root wheel 67 Jun 14 19:49 idle3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/idle3
lrwxr-xr-x 1 root wheel 69 Jun 14 19:49 idle3.9 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/idle3.9
lrwxrwxr-x 1 root admin 66 Jun 14 19:50 pip3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/pip3
lrwxrwxr-x 1 root admin 68 Jun 14 19:50 pip3.9 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/pip3.9
lrwxr-xr-x 1 root wheel 68 Jun 14 19:49 pydoc3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/pydoc3
lrwxr-xr-x 1 root wheel 70 Jun 14 19:49 pydoc3.9 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/pydoc3.9
lrwxr-xr-x 1 root wheel 69 Jun 14 19:49 python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3
lrwxr-xr-x 1 root wheel 76 Jun 14 19:49 python3-config -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3-config
lrwxr-xr-x 1 root wheel 71 Jun 14 19:49 python3.9 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
lrwxr-xr-x 1 root wheel 78 Jun 14 19:49 python3.9-config -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9-config
但是当我尝试删除符号链接时,它显示“未找到此类文件或目录”
我正在使用这些命令:
cd /usr/local/bin
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/3.9' | awk '{print $9}' | tr -d @ | xargs rm*