How to completely uninstall Python 2.7 from Windows 7 PC

随声附和 提交于 2019-12-23 18:49:55

问题


Having installed Python 2.7 from here:

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.

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:

How to completely remove Python from a Windows machine?

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

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

How can I test that it has been completely removed?


回答1:


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,

  • 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

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




回答2:


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 --version

into the command prompt, I was getting the following:

Python 2.7.6 -- CUSTOM


来源:https://stackoverflow.com/questions/28723607/how-to-completely-uninstall-python-2-7-from-windows-7-pc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!