本文教你如何从电脑中删除Python应用程序及其相关文件和文件夹。Windows和Mac电脑上都可以这样操作。
步骤
方法 1 的 2:
Windows
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/0\/0f\/Uninstall-Python-Step-1-Version-3.jpg\/v4-460px-Uninstall-Python-Step-1-Version-3.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/0\/0f\/Uninstall-Python-Step-1-Version-3.jpg\/v4-728px-Uninstall-Python-Step-1-Version-3.jpg","smallWidth":460,"smallHeight":344,"bigWidth":728,"bigHeight":545,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
1
打开“开始”菜单{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/0\/07\/Windowsstart.png","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/0\/07\/Windowsstart.png\/30px-Windowsstart.png","smallWidth":460,"smallHeight":460,"bigWidth":30,"bigHeight":30,"licensing":"<div class=\"mw-parser-output\"><\/div>"}。点击屏幕左下角的Windows标志。点击后会出现一个弹出菜单。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/6\/68\/Uninstall-Python-Step-2-Version-3.jpg\/v4-460px-Uninstall-Python-Step-2-Version-3.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/6\/68\/Uninstall-Python-Step-2-Version-3.jpg\/v4-728px-Uninstall-Python-Step-2-Version-3.jpg","smallWidth":460,"smallHeight":344,"bigWidth":728,"bigHeight":545,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
2
打开“设置”{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/d\/d0\/Windowssettings.png","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/d\/d0\/Windowssettings.png\/31px-Windowssettings.png","smallWidth":460,"smallHeight":445,"bigWidth":31,"bigHeight":30,"licensing":"<div class=\"mw-parser-output\"><\/div>"}。点击“开始”菜单左下角的“设置”齿轮图标。这样将打开“设置”窗口。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/b\/bc\/Uninstall-Python-Step-3-Version-3.jpg\/v4-460px-Uninstall-Python-Step-3-Version-3.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/b\/bc\/Uninstall-Python-Step-3-Version-3.jpg\/v4-728px-Uninstall-Python-Step-3-Version-3.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
3
点击应用程序。它在“设置”窗口的中间。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/f\/f5\/Uninstall-Python-Step-4-Version-3.jpg\/v4-460px-Uninstall-Python-Step-4-Version-3.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/f\/f5\/Uninstall-Python-Step-4-Version-3.jpg\/v4-728px-Uninstall-Python-Step-4-Version-3.jpg","smallWidth":460,"smallHeight":346,"bigWidth":728,"bigHeight":548,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
4
找到要卸载的Python版本。向下滚动到“P”部分,然后查找名称中有“Python”的应用程序,例如“Python 3.6”。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/6\/6d\/Uninstall-Python-Step-5-Version-3.jpg\/v4-460px-Uninstall-Python-Step-5-Version-3.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/6\/6d\/Uninstall-Python-Step-5-Version-3.jpg\/v4-728px-Uninstall-Python-Step-5-Version-3.jpg","smallWidth":460,"smallHeight":346,"bigWidth":728,"bigHeight":548,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
5
点击Python版本名称。这将会展开它,显示一个卸载按钮。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/5\/58\/Uninstall-Python-Step-6-Version-3.jpg\/v4-460px-Uninstall-Python-Step-6-Version-3.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/5\/58\/Uninstall-Python-Step-6-Version-3.jpg\/v4-728px-Uninstall-Python-Step-6-Version-3.jpg","smallWidth":460,"smallHeight":347,"bigWidth":728,"bigHeight":549,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
6
点击卸载。它在Python版本名称下面。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/9\/9f\/Uninstall-Python-Step-7.jpg\/v4-460px-Uninstall-Python-Step-7.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/9\/9f\/Uninstall-Python-Step-7.jpg\/v4-728px-Uninstall-Python-Step-7.jpg","smallWidth":460,"smallHeight":344,"bigWidth":728,"bigHeight":544,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
7
出现提示时,点击卸载。你应该可以看到它出现在Python版本名称的顶部。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/c\/cb\/Uninstall-Python-Step-8.jpg\/v4-460px-Uninstall-Python-Step-8.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/c\/cb\/Uninstall-Python-Step-8.jpg\/v4-728px-Uninstall-Python-Step-8.jpg","smallWidth":460,"smallHeight":346,"bigWidth":728,"bigHeight":548,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
8
出现提示时,点击是,确认你想要卸载Python。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/3\/35\/Uninstall-Python-Step-9.jpg\/v4-460px-Uninstall-Python-Step-9.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/3\/35\/Uninstall-Python-Step-9.jpg\/v4-728px-Uninstall-Python-Step-9.jpg","smallWidth":460,"smallHeight":347,"bigWidth":728,"bigHeight":549,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
9
允许Python卸载。你应该会看到一个带有进度条的弹出窗口出现。进度条结束并消失后,Python应该已经成功卸载。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/7\/78\/Uninstall-Python-Step-10.jpg\/v4-460px-Uninstall-Python-Step-10.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/7\/78\/Uninstall-Python-Step-10.jpg\/v4-728px-Uninstall-Python-Step-10.jpg","smallWidth":460,"smallHeight":344,"bigWidth":728,"bigHeight":545,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
10
如果有需要,卸载其他版本的Python。由于Python可以同时安装多个版本,在已安装的应用程序的“P”部分中,搜索更多已安装的Python。如果你发现安装了另一个版本的Python,必要时可以重复上面的步骤卸载它。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/6\/6e\/Uninstall-Python-Step-11.jpg\/v4-460px-Uninstall-Python-Step-11.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/6\/6e\/Uninstall-Python-Step-11.jpg\/v4-728px-Uninstall-Python-Step-11.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
11
删除python 2文件夹。卸载python 3将从电脑中删除python 3文件夹,但是即使卸载了python 2文件夹的程序,文件夹仍然会保留在你的电脑中。要删除这个文件夹,请执行以下操作:
- 打开“此电脑”。
- 双击“设备和驱动器”部分中的硬盘驱动器。
- 在文件夹列表中找到“Python27”或类似的文件夹。
- 选择Python文件夹,然后右击,弹出一个下拉菜单。
- 点击下拉菜单中的删除。
方法 2 的 2:
Mac
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/b\/be\/Uninstall-Python-Step-12.jpg\/v4-460px-Uninstall-Python-Step-12.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/b\/be\/Uninstall-Python-Step-12.jpg\/v4-728px-Uninstall-Python-Step-12.jpg","smallWidth":460,"smallHeight":346,"bigWidth":728,"bigHeight":547,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
1
打开{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/1\/1d\/Macfinder2.png","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/1\/1d\/Macfinder2.png\/32px-Macfinder2.png","smallWidth":460,"smallHeight":431,"bigWidth":32,"bigHeight":30,"licensing":"<div class=\"mw-parser-output\"><\/div>"}“访达”。在Mac的“程序坞”中,点击“访达”应用程序图标,它看起来像一张蓝色的脸。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/a\/a3\/Uninstall-Python-Step-13.jpg\/v4-460px-Uninstall-Python-Step-13.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/a\/a3\/Uninstall-Python-Step-13.jpg\/v4-728px-Uninstall-Python-Step-13.jpg","smallWidth":460,"smallHeight":342,"bigWidth":728,"bigHeight":541,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
2
点击前往。它是屏幕顶部的一个菜单项。点击后会弹出一个下拉菜单。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/5\/59\/Uninstall-Python-Step-14.jpg\/v4-460px-Uninstall-Python-Step-14.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/5\/59\/Uninstall-Python-Step-14.jpg\/v4-728px-Uninstall-Python-Step-14.jpg","smallWidth":460,"smallHeight":344,"bigWidth":728,"bigHeight":545,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
3
点击前往文件夹。你可以在“前往”下拉菜单的底部找到它。点击后会打开一个弹出窗口。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/f\/f3\/Uninstall-Python-Step-15.jpg\/v4-460px-Uninstall-Python-Step-15.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/f\/f3\/Uninstall-Python-Step-15.jpg\/v4-728px-Uninstall-Python-Step-15.jpg","smallWidth":460,"smallHeight":347,"bigWidth":728,"bigHeight":549,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
4
输入Python安装文件夹的地址。根据你安装的Python版本,你需要在“前往文件夹”文本框中输入下列地址之一: [1]
- 对于python3.6或更高版本,在这里输入/Library/Frameworks/Python.framework/Versions。
- 对于python2.7,在这里输入/Library/Python/Versions或/Library/Python。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/3\/3f\/Uninstall-Python-Step-16.jpg\/v4-460px-Uninstall-Python-Step-16.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/3\/3f\/Uninstall-Python-Step-16.jpg\/v4-728px-Uninstall-Python-Step-16.jpg","smallWidth":460,"smallHeight":347,"bigWidth":728,"bigHeight":549,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
5
点击前往。它在弹出窗口的底部。这样就会打开Python的安装文件夹。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/d\/d2\/Uninstall-Python-Step-17.jpg\/v4-460px-Uninstall-Python-Step-17.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/d\/d2\/Uninstall-Python-Step-17.jpg\/v4-728px-Uninstall-Python-Step-17.jpg","smallWidth":460,"smallHeight":346,"bigWidth":728,"bigHeight":547,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
6
选择版本号文件夹。单击以Python版本号作为名称的文件夹。
- 例如,如果你正在删除Python 3.6,你需要单击选择3.6文件夹。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/3\/37\/Uninstall-Python-Step-18.jpg\/v4-460px-Uninstall-Python-Step-18.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/3\/37\/Uninstall-Python-Step-18.jpg\/v4-728px-Uninstall-Python-Step-18.jpg","smallWidth":460,"smallHeight":344,"bigWidth":728,"bigHeight":544,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
7
点击文件。它在Mac电脑屏幕的左上角。点击后将弹出一个下拉菜单。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/a\/aa\/Uninstall-Python-Step-19.jpg\/v4-460px-Uninstall-Python-Step-19.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/a\/aa\/Uninstall-Python-Step-19.jpg\/v4-728px-Uninstall-Python-Step-19.jpg","smallWidth":460,"smallHeight":341,"bigWidth":728,"bigHeight":540,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
8
点击移到废纸篓。这个选项在文件下拉菜单中。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/4\/41\/Uninstall-Python-Step-20.jpg\/v4-460px-Uninstall-Python-Step-20.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/4\/41\/Uninstall-Python-Step-20.jpg\/v4-728px-Uninstall-Python-Step-20.jpg","smallWidth":460,"smallHeight":343,"bigWidth":728,"bigHeight":543,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
9
出现提示时输入密码。输入你登录Mac使用的密码。
- 如果没有要求你输入密码,跳过这个步骤和下一个步骤。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/d\/d9\/Uninstall-Python-Step-21.jpg\/v4-460px-Uninstall-Python-Step-21.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/d\/d9\/Uninstall-Python-Step-21.jpg\/v4-728px-Uninstall-Python-Step-21.jpg","smallWidth":460,"smallHeight":343,"bigWidth":728,"bigHeight":543,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
10
点击确定。它在密码提示符的底部。点击后将关闭密码窗口,并将所选的Python文件夹移至“废纸篓”中。
-
{"smallUrl":"https:\/\/www.zenmeban.com\/images_en\/thumb\/8\/82\/Uninstall-Python-Step-22.jpg\/v4-460px-Uninstall-Python-Step-22.jpg","bigUrl":"https:\/\/www.zenmeban.com\/images\/thumb\/8\/82\/Uninstall-Python-Step-22.jpg\/v4-728px-Uninstall-Python-Step-22.jpg","smallWidth":460,"smallHeight":348,"bigWidth":728,"bigHeight":550,"licensing":"<div class=\"mw-parser-output\"><\/div>"}
11
如果有需要,删除Python程序。并不是所有版本的Python都会在Mac的“应用程序”文件夹中安装一个程序,但是你应该检查一下。你可以通过以下操作查找和删除Python应用程序:
- 点击屏幕顶部的前往。
- 点击下拉菜单中的应用程序。
- 查找名称中包含“Python”的应用程序,例如“Python 3.6”。
- 如果找到应用程序,选择它。
- 点击文件,然后点击移到废纸篓。
- 输入密码,然后点击确定。
小提示
- 卸载Python 3也应该会从PATH变量列表中删除它。
警告
- 由于Python可以同时安装多个版本,你可能需要一段时间才能从电脑中完全卸载Python。