- How to reinstall python: On Different OS
- How to check Your Python Version on Windows
- How to reinstall python From the Microsoft Store
- Install the Python App
- How to Install From the Full Installer
- Step 1: Download the Full Installer
- Step 2: Run the Installer
- How to reinstall python on MacOS
- How to check your Python Version on a Mac
- How to reinstall python From the Official Installer
- Step 1: Download the Official Installer
- Step 2: Run the Installer
- How to reinstall python From Homebrew
- Step 1: Install Homebrew
- Step 2: Install Python
- How to Install Python on Linux
- How to Check Your Python Version on Linux
- How to reinstall python Step-by-Step Installation Instructions
- On Debian
- On Fedora:
- Step 6: Verify the Installation
- Conclusion
How to reinstall python: On Different OS
The first step towards learning any language is installing and reinstalling that particular language that you want to learn to your local. And in this blog, we will discuss how to reinstall python. There are many different methods through which one can install python easily. Also, People can easily download official python distributions from Python.org and install the package manager.
In this blog, we will focus on the following things:
- Firstly, how to check which version of Python if any installed on your local.
- Secondly, how to install Python on MacOS, Windows and Linux.
So, whichever OS you are using don’t worry we have got you covered with this blog. Now find your operating system and just dive in to get ready on how to reinstall python
How to check Your Python Version on Windows
To check the version of python on your Windows machine, you need to first open a command-line prompt such as PowerShell.
Given below is the way through which you can open PowerShell.
- Firstly, you need to press the Win key.
- After that type PowerShell .
- Lastly, press Enter .
Also, you can use the cmd.exe command or Windows Terminal.
Now once you open the command you need to type in the following command and then press Enter.
C:\> python --version Python 3.8.4
When you use the –version switch will show a different version that’s installed or you can use the -v switch.
There are three different methods through which you can easily install the Python distribution on Windows:
The part given below will we will just focus on the first two options which are basically popular installation methods in a Windows environment. If you want to go through part 3 then go to the Linux section of this blog after you have installed the Linux distribution of your choice.
How to reinstall python From the Microsoft Store
This is for people who are new to this and looking for a quick way to get started. Then Microsoft store package is the way to go.
- Firstly, open the python app page in the Microsoft Store.
- You will see different versions that you can choose to install.
- Then select the Python 3.8 because this is the highest version number python is available in the app to open the installation page.
Install the Python App
Once you have selected the version to be installed, follow the steps given below to complete your installation process.
- Firstly, click Get.
- Then wait for the application to get downloaded in your local. Once it finished downloading the Get button will be changed to a button that says Install on my devices.
- After that click on Install on my devices and then select the devices on which you would like to complete the installation.
- Then click on Install Now and then OK to start the process of installation.
- Now if the installation is successful you will recieve a message “This product is installed” which will pop-up at the top of the Microsoft Store page.
Now you have easily installed and set up Python which also includes pip and IDLE!
How to Install From the Full Installer
This is for those developers who need a full-featured Python development environment. Then installing from the full installer is the right choice. The full installer provides different customization options and control over the installation then installing from the Microsoft Store. It is very easy to install the Full Installer in just two steps.
Step 1: Download the Full Installer
- Firstly, you need to open your secure browser and then navigate to the Python.org Downloads page for Windows.
- Now under the “Python Releases for Windows” heading you need to click the link for the latest Python 3 Release- Python 3.x.x. The latest version as of now is Python 3.8.4.
- Now go to the bottom and then choose the either Windows x86-64 excecutable installer for 64-bit or windows x86 excecutable installer for 32-bit.
Step 2: Run the Installer
Now once you have chosen and downloaded the installer you need to check it by running the file by double-clicking on the downloaded file. A box will pop up on the screen as shown below.
There are 4 things that you need to check in the dialog box.
- Firstly, you need to check the deault install path is in the AppData/ directory of the current Windows user.
- Then secondly check the customize installation button can be used to customize the installtion loaction and which additional features get installed which also includes Pip and IDLE.
- Install launcher for all users checbox is already checked by itself. Which means that user on the machine will ingress to the py.exe launcher. If you don’t want you can also uncheck this box to restrict Python to the current Window user.
How to reinstall python on MacOS
In order versions of macOS Python, 2 came preinstalled. Now, this is no the case for the current new versions of the macOS starting with macOS Catalina.
There are 2 different ways through which you can easily install Python on macOS:
In this part, we will check which version of python if any is installed on your macOS device. Also, you will learn how to install the new version of Python through these two new methods.
How to check your Python Version on a Mac
If you want to check the Python version on your Mac you need to first open a command-line application such as a terminal.
Here is how you can open the terminal easily.
- Firstly, you need to press the Cmd + Space keys.
- Then after that type Terminal .
- Lastly, all you need to do is press Enter .
Once you open the command line you need to type in the following command.
# Check the system Python version $ python --version # Check the Python 2 version $ python2 --version # Check the Python 3 version $ python3 --version
Now if you have a Python in your system then any one of these commands will respond with a version number.
Let us provide you with an example so if you already have Python 3.6.10 setup on your local then the Python3 command would display that version number.
$ python3 --version Python 3.6.10
How to reinstall python From the Official Installer
This is the most reliable installation method on macOS. This official installer provides you will all the dependencies needed for developing applications with python.
The installation from the official installer is in two easy steps.
Step 1: Download the Official Installer
Go through the steps given below to download the full installer:
- Firstly, open your safe and secure browser and navigate to the Python.org Downloads page for macOS.
- Now under the “Python Releases for Mac OS X” heading click the link for the latest Python 3 release.
- Now scroll down to the bottom and then tap on the macOS 64-bit installer to start the download.
Once the installer is finished downloading move on to the next step.
Step 2: Run the Installer
To run the installer, you need to double-click the downloaded file. You will see the window which is given below.
To complete the process of the installation follow the steps given below:
- Firstly, press continue a few number of times and then you will be asked to agree to the software license agreement. Then click Agree.
- Now you will be shown window that will tell you the install destination and also how much space will it take. People generally choose the default location and so go on and click on the install to start the installation process.
- Once the installer is finished copying files click on the close to close the installer window.
Well done you have installed the latest version of Python 3 on your macOS computer.
How to reinstall python From Homebrew
For developers who won’t be using Python to develop graphical user interfaces like the Tkinter module, the Homebrew package manager is a good option. You can install the Homebrew package manager in easy two steps.
Step 1: Install Homebrew
If you already have Homebrew in your local then you can skip this step and if you don’t have Homebrew in your system then go through the steps given below to install Homebrew.
- Firstly, open a browser and then visit the http://brew.sh/.
- Now you will see a command line for installing Homebrew near the top of the page right under the title “Install Homebrew”. The command will be like given below.
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Now Highlight the command with your mouse pad and then tap on Cmd + C to copy it to your clipboard.
- Now open a terminal window and paste the command that you have copied and then press Enter. This will start your Homebrew installation.
- Lastely, enter your macOS user password when the pop-up appears.
Now depending on the stability of your internet connection it might few minutes to download all of Homebrew’s required files. Once the installation is complete you will go back to the terminal window.
Step 2: Install Python
Follow these steps to complete the installation with Homebrew:
- Firstly, open a terminal application.
- Then after that write the following command to upgrade Homebrew:
$ brew update && brew upgrade
Now installing with Homebrew is now as straightforward as it can get as running the command brew install Python3. This is all you have to type and what it will do is download and set up the latest version of Python on your Machine.
Also, you can make sure everything went correctly by testing if you can access Python from the terminal.
- Firstly, open a terminal.
- Then you need to type pip3 and then press Enter.
- Now you will get the help text from Python’s pip package manager.
Well done now you have Python on your macOS system.
How to Install Python on Linux
There are two different methods of installing Linux:
Now in this part, we will check which version of Python if any installed in your local then of which version it is. Also, you will learn which of the two installation methods you can use to install Python on your Linux OS.
How to Check Your Python Version on Linux
To find which version of python you have in your Linux OS, you need to open a terminal window and then type any one of the following commands.
# Check the system Python version $ python --version # Check the Python 2 version $ python2 --version # Check the Python 3 version $ python3 --version
Now if you have python in your local then any of these commands will respond with a version number very easily.
How to reinstall python Step-by-Step Installation Instructions
Step 1: Firstly, you need to install the development packages required to build Python
On Debian
$ sudo apt update $ sudo apt install build-essential zlib1g-dev \ libncurses5-dev libgdbm-dev libnss3-dev \ libssl-dev libreadline-dev libffi-dev curl
On Fedora:
$ sudo dnf groupinstall development
Step 2: Now you need to download the stable latest release of Python 3
To download the latest version of Python 3 visit the official Python website.
Step 3: Extract the tarball
After the download is finished you need to extract the tarball by either using the extractor application of your choice or the Linux tar command, for example:
Step 4: Configure the Script
Now after you have extracted your Python tarball go to the configure script and then execute the Linux terminal with:
Step 5: Start the build process
Now if you already have a version of Python installed in your local and you want to install the new version alongside the older version you can use the command given below.
The build process may take some time.
Step 6: Verify the Installation
Now till now if you haven’t encountered any error the python is installed on your Linux system. If you want to verify it, write one of these commands given below in the terminal:
Now if the output says Python 3.x, Congratulations your Python 3 has been successfully installed.
Conclusion
We hope now you know how to reinstall python. Now you have the access to the latest version of Python for your system. Your Python journey is now started. Now you know How to reinstall python on which OS you want. Hope you find this information useful. Thank you for the read.