Every student or professional in the field of computer science knows about Python. According to a survey in 2020, more than 8 million python developers are there in the world. This article is about the steps to uninstall Python from a system.
Why Python?
Python is one of the most popular programming languages as it is easy to use, easy to install and uninstall. Guido Van Rossum created this programming language. He assumed the open-source model would be ideal for adoption and bolstering innovation.
- It is easy to install and uninstall.
- It concentrates on code readability. The language is well-structured, versatile, and easy to learn.
- Python enables you to take the best of various paradigms of programming. It also actively utilizes operative programming traits.
- There is a library for anything one could think of: web development to machine learning.
How to uninstall Python from different platforms
For Windows:
Steps to uninstall Python from a device:
- Open Control Panel.
- Then, go to all control panel items.
- Click on program and features then, a list of all the installed programs shall appear on the screen.
- Select Python from the list and right-click on it. Then click uninstall.
- A dialogue box shall appear on the screen asking for confirmation.
- Click yes.
- The process of uninstalling Python is complete.
Usually, the Python uninstaller removes itself from the path, including all the python files. One can also remove the additional python files manually. To do that, follow the below steps:
- Click on Windows
- Type Environment Variables and hit enter.
- A pop-up window will appear. Select the environment variable on the bottom right.
- Under the system variable section, click on the path and select edit.
- Locate the bin folder of Python. Select that folder and click delete to remove it from the path.
- Python gets entirely removed from the system.
For MAC:
Steps to uninstall Python from a device:
- Open Finder, then click on Applications.
- Find the Python folder. Right-click on it.
- Click Move to Trash
- The process of uninstalling Python is complete.
Python comes pre-installed in MAC. Manually uninstalling Python from MAC may harm the system. But one can remove the third-party python framework by searching in the Finder or manually in the terminal.
For Linux:
Linux also comes with already pre-installed Python. Manually uninstalling Python can harm the Graphical Display Manager. But there is no harm or side effect in uninstalling the manually installed Python version.
Here is the set of commands to uninstall Python:
# Remove python2
sudo apt purge -y python2.7-minimal
# You already have Python3 but
# don't care about the version
sudo ln -s /usr/bin/python3 /usr/bin/python
# Same for pip
sudo apt install -y python3-pip
sudo ln -s /usr/bin/pip3 /usr/bin/pip
# Confirm the new version of Python: 3
python --version
To sum up:
Python is one of the widespread and most used programming languages. Because of its popularity, it comes pre-installed with various OS like Mac and Linux, unlike Windows. In Windows OS, programmers have to manually install Python in their system. It is not advisable to uninstall Python in Mac or Linux because it might harm the Operating System or Graphical Display Manager.