Here's the steps (my non-computer-savvy girlfriend had to figure this one out for me, but unlike all the far more complicated processes one can find online, this one works)
- Open Control Panel
- Click "Uninstall a Program"
- Scroll down to Python and click uninstall for each version you don't want anymore.
This works on Windows 7 out of the box, no additional programs or scripts required.
Answer from ArtOfWarfare on Stack OverflowHere's the steps (my non-computer-savvy girlfriend had to figure this one out for me, but unlike all the far more complicated processes one can find online, this one works)
- Open Control Panel
- Click "Uninstall a Program"
- Scroll down to Python and click uninstall for each version you don't want anymore.
This works on Windows 7 out of the box, no additional programs or scripts required.
You will also have to look in your system path. Python puts itself there and does not remove itself: http://www.computerhope.com/issues/ch000549.htm
Your problems probably started because your python path is pointing to the wrong one.
so im on win10 and running python 3.8.3 and my pip suddenly stopped working and couldnt get it to work anymore. i tried lots of things but sadly nothing .
so i would like to completely remove python ( and the cache or whatever will be scattered or left behind by the installer) . anyone can help me on this
Videos
I'm trying to reinstall Python but it won't let me. Whenever I run the installer and select Uninstall it shows me that is was successfully uninstalled, but it wasn't.
Any ideas on this?
Info: Windows 11
The following commands will remove your make altinstall-ed python:
rm -f /usr/local/bin/python2.7
rm -f /usr/local/bin/pip2.7
rm -f /usr/local/bin/pydoc
rm -rf /usr/local/include/python2.7
rm -f /usr/local/lib/libpython2.7.a
rm -rf /usr/local/lib/python2.7
You might also have to do
rm -f /usr/local/share/man/python2.7.1
rm -rf /usr/local/lib/pkgconfig
rm -f /usr/local/bin/idle
rm -f /usr/local/bin/easy_install-2.7
Although make altinstall has served me well if the "system python" has a different major.minor number from the one you install, it doesn't work that well if only the micro number (the third position) differs. That number is excluded from the installed binary, and you end up with two versions pythonX.Y. This was always a problem but once distributions started shipping with system utilities based on 2.7.X this problem has been more severe as 2.7 is supposed to be the last of the Python2 series.
IMO the best approach to solve this problem is to prevent it from becoming one: configure python to install in a directory not used by any other python. On my system they go under /opt/python/X.Y.Z.
To use any of the Pythons installed there you use [virualenv][1] to make a new environment:
virtualenv --python=/opt/python/2.7.9/bin/python2.7 venv
source venv/bin/activate
or use [virtualenvwrapper][2]. I have some aliases for the latest versions in the series I work with.
If you are using tox for testing against multiple versions (you should) the following alias will help it find the various version:
alias tox='PATH=/opt/python/2.7.9/bin:/opt/python/2.6.9/bin:/opt/python/3.4.3/bin:/opt/python/3.3.6/bin:/opt/python/3.5-dev/bin:$PATH tox'
(these are currently the latest versions, I use a slightly different setup by maintaining links from /opt/python/2.7 to the latest /opt/python/2.7.9, and for the other minor numbers as well, within the process for downloading, building and installing a new python version)
These installs are never used directly. They are always used as the basis for virtualenv environments only, hence I don't care that they are not in my normal PATH.
Starting from @Anthon's rm list, and applying @bin-s advice to search for newer files, i came up with this bash-script to completely wipe-out my Python-3.6.6 (which had been installed from sources with make altinstall):
prefix='/usr/local/'
pyver='3.6'
rm -rf \
$HOME/.local/lib/Python${pyver} \
${prefix}bin/python${pyver} \
${prefix}bin/python${pyver}-config \
${prefix}bin/pip${pyver} \
${prefix}bin/pydoc \
${prefix}bin/include/python${pyver} \
${prefix}lib/libpython${pyver}.a \
${prefix}lib/python${pyver} \
${prefix}lib/pkgconfig/python-${pyver}.pc \
${prefix}lib/libpython${pyver}m.a \
${prefix}bin/python${pyver}m \
${prefix}bin/2to3-${pyver} \
${prefix}bin/python${pyver}m-config \
${prefix}bin/idle${pyver} \
${prefix}bin/pydoc${pyver} \
${prefix}bin/pyvenv-${pyver} \
${prefix}share/man/man1/python${pyver}.1 \
${prefix}include/python${pyver}m
rm -rI ${prefix}bin/pydoc ## WARN: skip if other pythons in local exist.
Use it with care (e.g. add -I option in rm command, to verify each kill).
in case you still need it.
first of all, it's never advisable to uninstall python. check for instance this link.
having said this, Ubuntu 16.04 does not depend (wasn't build) on Python 3.9 (check this out, for instance). thus, and in principle you shouldn't be having problems fully uninstalling it... as it was my case.
i had no troubles following these steps; which for you/me would be something like:
sudo apt-get clean
sudo apt-get autoremove --purge
sudo apt-get remove python3.9
sudo apt-get autoremove
good luck! Install synaptic using
sudo apt install synapticOpen synaptic

Search for "python 3.9"

Right click on "python 3.9" and Select "mark for complete removal"

Click apply
Solution:
UNHIDE ALL FOLDERS BEFORE FOLLOWING DOWN...
- Go to C:\Users\%USERNAME%\AppData\Local\Programs
- Delete Python Folder
- Go to Control Panel >> Uninstall a Program
- Right Click on Python and then Change/Modify
- Click on Repair Python. Note: This may or may not fail, but be patient
- Now Again go to step 3
- Now, after step 3, uninstall Python
Now you should be able to install a new fresh version.
It's also possible to execute the python3 installer again, you get option to repair or uninstall. Just choose uninstall, it will be done properly.