Skip to main content

How to Uninstall Python on Windows, Mac and Linux Pratik Sah The Crazy Programmer

Many times we ran into problems where nothing related to Python seems working fine and we want to uninstall it completely and re-install it to remove the problem.

So, in this post, we are going to see How to uninstall Python on Windows, Mac and Linux.

How to Uninstall Python on Windows, Mac and Linux

Uninstall Python on Windows

Uninstalling Python on Windows is an easy task. You just need to follow some steps and you are good to go.

Below are the steps to uninstall Python from Windows.

  1. Open Control Panel
  2. Click on Uninstall a Program
  3. Scroll down till you see the installed Python version and Select it and click uninstall for each version.

Once you are done with the above step, you are left with one final step; Removing it from Path.

Although the python uninstaller removes itself from the path, it’s recommended to manually check the path to be sure.

To remove Python from the system path, follow the below steps and it will be removed permanently.

  1. Click on the Windows button and search “Environment Variables“.
  2. In the Environment Variables window, click on Path variable in the system variable section, click the edit button.
  3. Look for the path of the Python bin folder and remove it from the path.

And you are done. This is going to Uninstall Python from the Windows machine.

Uninstall Python on Mac

Mac ships with Python pre-installed and it is a very bad idea of uninstalling them.

If you try to uninstall the pre-installed Python v2.7 or above, it may break your operating system. I recommend not touching it.

If you’ve installed any third party python framework, you can follow the below steps.

Open your terminal and paste the below commands.

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7

Remove the Python 2.7 applications directory

sudo rm -rf "/Applications/Python 2.7"

Remove the symbolic links, that point to this Python version. See them using

ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'

and then run the following command to remove all the links:

cd /usr/local/bin/ ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm

You can find the complete details here on Stackoverflow.

Uninstall Python on Linux (Ubuntu)

The same problem may arise if you’ll try to uninstall pre-installed Python in your Linux/Ubuntu. It is not recommended to remove the default Python from Ubuntu.

It can cause the Graphical Display Manager to fail because of uninstalling Python.

You can only uninstall Python which you installed manually.

Below is the command for uninstalling 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

Sometimes you also have to update your apt repo list. Here is the command for the same.

sudo apt get update

Well, this was all about how to Uninstall Python and I hope you understood uninstalling Python for your OS.

If you have found this post helpful, please share it with your friends or colleagues who are looking for python programming.

And if you have started with Python development and stuck in some kind of problem or bug, you can leave your comment here and we will get back to you soon🤓.

The post How to Uninstall Python on Windows, Mac and Linux appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3fdTxhk

Comments

Popular posts from this blog

Difference between Web Designer and Web Developer Neeraj Mishra The Crazy Programmer

Have you ever wondered about the distinctions between web developers’ and web designers’ duties and obligations? You’re not alone! Many people have trouble distinguishing between these two. Although they collaborate to publish new websites on the internet, web developers and web designers play very different roles. To put these job possibilities into perspective, consider the construction of a house. To create a vision for the house, including the visual components, the space planning and layout, the materials, and the overall appearance and sense of the space, you need an architect. That said, to translate an idea into a building, you need construction professionals to take those architectural drawings and put them into practice. Image Source In a similar vein, web development and design work together to create websites. Let’s examine the major responsibilities and distinctions between web developers and web designers. Let’s get going, shall we? What Does a Web Designer Do?

A guide to data integration tools

CData Software is a leader in data access and connectivity solutions. It specializes in the development of data drivers and data access technologies for real-time access to online or on-premise applications, databases and web APIs. The company is focused on bringing data connectivity capabilities natively into tools organizations already use. It also features ETL/ELT solutions, enterprise connectors, and data visualization. Matillion ’s data transformation software empowers customers to extract data from a wide number of sources, load it into their chosen cloud data warehouse (CDW) and transform that data from its siloed source state, into analytics-ready insights – prepared for advanced analytics, machine learning, and artificial intelligence use cases. Only Matillion is purpose-built for Snowflake, Amazon Redshift, Google BigQuery, and Microsoft Azure, enabling businesses to achieve new levels of simplicity, speed, scale, and savings. Trusted by companies of all sizes to meet

2022: The year of hybrid work

Remote work was once considered a luxury to many, but in 2020, it became a necessity for a large portion of the workforce, as the scary and unknown COVID-19 virus sickened and even took the lives of so many people around the world.  Some workers were able to thrive in a remote setting, while others felt isolated and struggled to keep up a balance between their work and home lives. Last year saw the availability of life-saving vaccines, so companies were able to start having the conversation about what to do next. Should they keep everyone remote? Should they go back to working in the office full time? Or should they do something in between? Enter hybrid work, which offers a mix of the two. A Fall 2021 study conducted by Google revealed that over 75% of survey respondents expect hybrid work to become a standard practice within their organization within the next three years.  Thus, two years after the world abruptly shifted to widespread adoption of remote work, we are declaring 20