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.
Fixlet for uninstallation of Python older version
uninstallation - Remove all previous versions of python - Stack Overflow
Need advice on how to completely uninstall python
Uninstall old Python versions
Videos
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
Install all the Python X.Y versions you want, but include Python 3.3 or later (last is best, or reinstall it after all the others) to get the Python Launcher that @abarnert mentioned in his comments. It is also available as a standalone installer.
Earlier versions than 3.3 should not register extensions, so the launcher installed by 3.3 or later will remain the default handler for .py files.
From the command line:
py -2 # launch latest 2.x version installed.
py -3 # latest 3.x
py -3.2 # run exact version
py -3.2-32 # run 32-bit version on 64-bit system.
So you can even have mixed 32-bit and 64-bit installations.
The environment variable PY_PYTHON can be set to specify the default Python to run.
In scripts, add a comment of the following forms below to use that version of Python when the script is double-clicked or run from command line via py script.py:
#!python2
#!python3
#!python3.2
#!python3.2-32
See PEP 397 for further details.
You can install multiple versions of Python on Windows, but only the last version you installed will be used by default: when double-clicking a .py file in Windows Explorer, when typing just python at the command line, etc. "Edit in IDLE" on the context menu also uses the last version you installed. To use other versions you'll need to specify the full path of the version you want. Also, if you use the PYTHONPATH environment variable, there's only one of those, and the scripts in the directories specified in PYTHONPATH may or may not work with whatever version of Python you happen to be running. This can be worked around by writing a batch file that sets PYTHONPATH before launching Python.
I currently have 3.10x and 3.11.x and I want to know how can I uninstall the older version of python I have ?
also for future how do I upgrade from 3.11.2 to say 3.11.4 or 3.12.x
I can't seem to find a clear answer on this. I don't want a dozen old versions of Python cluttering up my hard drive.
Actually, there are only 3 versions of Python in Ubuntu 14.04 repository: 2.7, 3.3, 3.4
- Almost all applications use v2.7 , so I could say it: noway to remove it.
- v3.3 not used (only if you are a developer), could be removed no harm.
- v3.4 few applications start using it as alternative (they keep 2.7 compatibility), could be removed but check if it will suggest removing other packages.
It is possible to check their reverse dependencies, using apt-cache to get better idea:
apt-cache rdepends python2.7
apt-cache rdepends python3.3
apt-cache rdepends python3.4
Yes, the packages that need python to run are version specific, as python2.x is very different than python3.x:
http://www.slideshare.net/pablito56/python-2-vs-python-3
There is an effort to migrate all the packages of Ubuntu to Python 3 since ubuntu 12.10 and also its not allowed new packages using Python 2.
Python 2 is only maintained for provide support to legacy apps.
Fonts:
https://wiki.ubuntu.com/Python/FoundationsQPythonVersions
https://wiki.ubuntu.com/Python/3
(2) Are from snap
corepackage and you have 3 versions installed: 6130, 6259, 6350They don't interfere with system wide programs, they are only used for other snap packages.
(3) It is a locally installed Python2, that will take priority and better to get rid of it if you don't need it.
If you still have the downloaded source, use the uninstall command. If not then you have to make manual remove.
apt-get / apt (side-note: no actual difference of the two, see What is the difference between apt and apt-get?) is independent from the individual packages you might install (which is logical at second sight). See apt-get install for different python versions. That is on purpose.
pip2.7
+++EDIT: It seems that the solution for pip does not work, since I got a "Permission denied" after really executing the example commands.+++ Also see this that has no answer.
If you want to uninstall an old pip, you should use
python2.7 -m pip uninstall pip for getting rid of pip2.7 (for example).
and yes, "pip2.7 can uninstall pip2.7", this as a proof:
~/myfoldername $ pip -V
pip 20.3.1 from /home/myusername/myfoldername/venv/myvirtualenvironment/lib/python2.7/site-packages/pip (python 2.7)
~/myfoldername $ python2.7 -m pip uninstall pip
DEPRECATION: Python 2.7 reached the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Found existing installation: pip 20.3.1 Uninstalling pip-20.3.1:
Would remove:
/home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip
/home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip-2.7
/home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip2
/home/myusername/myprojectname/venv/myvirtualenvironment/bin/pip2.7
/home/myusername/myprojectname/venv/myvirtualenvironment/lib/python2.7/site-packages/pip-20.3.1.dist-info/*
/home/myusername/myprojectname/venv/myvirtualenvironment/lib/python2.7/site-packages/pip-20.3.1.virtualenv
/home/myusername/myprojectname/venv/myvirtualenvironment/lib/python2.7/site-packages/pip/*
Proceed (y/n)? n
pip3.7
~/myprojectname $ python3.7 -m pip uninstall pip
Found existing installation: pip 20.3.3 Uninstalling pip-20.3.3: Would remove:
/home/myusername/.local/bin/pip
/home/myusername/.local/bin/pip3
/home/myusername/.local/bin/pip3.7
/home/myusername/.local/lib/python3.7/site-packages/pip-20.3.3.dist-info/*
/home/myusername/.local/lib/python3.7/site-packages/pip/*
Proceed (y/n)? n
python2.7
Of course, that is not possible for python itself, you need: sudo apt-get remove python2.7
~/myfoldername $ sudo apt-get remove python2.7
0 upgraded, 2 newly installed, 402 to remove and 1 not upgraded.
Need to get 97,3 kB of archives.
After this operation, 387 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] n
Abort.
Installed packages on 3.9.7, currently using 3.11.4. I may have packages from even older versions, though I'm pretty sure I haven't installed anything before 3.9.7