如何从 Windows 7 PC 上完全卸载 Python 2.7

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28723607/
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-19 03:39:33  来源:igfitidea点击:

How to completely uninstall Python 2.7 from Windows 7 PC

pythoninstalluninstall

提问by Bazman

Having installed Python 2.7 from here:

从这里安装了 Python 2.7:

https://www.python.org/downloads/release/python-279/

https://www.python.org/downloads/release/python-279/

I then uninstalled it using the control panel (I have Windows 7 pro). Now Python 2.7 no longer appears in the list of installed programs, however the files are still sitting in the same place on the C:drive.

然后我使用控制面板卸载了它(我有 Windows 7 专业版)。现在 Python 2.7 不再出现在已安装程序的列表中,但是这些文件仍然位于C:驱动器上的相同位置。

I have since installed version 2.6 but I seem to be having some clashing issues between the versions. I'm having similar issues to this guy:

我已经安装了 2.6 版,但我似乎在版本之间遇到了一些冲突问题。我和这个人有类似的问题:

How to completely remove Python from a Windows machine?

如何从 Windows 机器中完全删除 Python?

I just want to know how can I remove Python 2.7 completely?

我只想知道如何完全删除 Python 2.7?

Will simply deleting the folders from my C:drive be sufficient?

简单地从我的C:驱动器中删除文件夹就足够了吗?

How can I test that it has been completely removed?

如何测试它是否已完全删除?

回答by amhenk

You should just be able to delete the local files if you've already uninstalled from control panel. Also be sure to go to your environment variables and make sure that the python 2.7 directory isn't there. To do that,

如果您已经从控制面板卸载,您应该能够删除本地文件。还要确保转到您的环境变量并确保 python 2.7 目录不存在。要做到这一点,

  • Go to the start menu and right click on Computer
  • Click on Properties
  • Advanced system settings
  • Environment Variables and look for "path" under system variables
  • Be sure to erase C:\...\Python2.7.x
  • 转到开始菜单并右键单击计算机
  • 点击属性
  • 高级系统设置
  • 环境变量并在系统变量下查找“路径”
  • 一定要擦除 C:\...\Python2.7.x

If you uninstalled from control panel it might not be there but it's probably good to double check. Also, be sure to delete the ;before C:\...\Python2.7.x

如果您从控制面板卸载它可能不存在,但仔细检查可能会很好。另外,一定要删除;之前的C:\...\Python2.7.x

回答by Alex

I had a similar problem. I kept installing Python 3.6 but when I typed "python" from the command prompt, Python 2.7 kept opening up despite the fact that I had uninstalled and it wasn't in my Path or in my Programs folder. I eventually solved the problem by uninstalling Enthought/Canopy from my computer and also erasing all the related files. Now I have a regular installation of Python 3.6 working and accessible from the command prompt. I assume I could now also get a parallel python 2.7 going, but I haven't tried to since I have no need for it at the moment. The giveaway for me that my python 2.7 installation was strange was that when I typed:

我有一个类似的问题。我一直在安装 Python 3.6,但是当我从命令提示符输入“python”时,尽管我已经卸载了 Python 2.7 并且它不在我的路径或我的程序文件夹中,但 Python 2.7 继续打开。我最终通过从我的计算机上卸载 Enthought/Canopy 并删除所有相关文件来解决这个问题。现在我有一个正常安装的 Python 3.6 工作并且可以从命令提示符访问。我想我现在也可以运行并行 python 2.7,但我没有尝试过,因为我目前不需要它。对我来说,我的 python 2.7 安装很奇怪的赠品是,当我输入:

python --version

into the command prompt, I was getting the following:

进入命令提示符,我得到以下信息:

Python 2.7.6 -- CUSTOM