In this article, we are going to install and set up Python 3 Interpreter on Our Desired Operating System (OS). we will cover how to install python latest or any specific previous version on any operating system. It may include Windows, Linux, Ubuntu, CentOS, MacOS, and Mobile Devices. we will also check some online interpreters where you don’t need to install python on your operating system. You can access those using your browser. They provide interpreter from their server so you can quickly run python code online and check your results.
Table of Contents
- 1 Installing python on windows:
- 2 Installing Python on Linux Operating System:
- 2.1 Install Python on Ubuntu:
- 2.2 Install python on Linux Mint
- 2.3 Install python on CentOS:
- 2.4 Install Python on Fedora
- 2.5 Install Python on Arch Linux
- 2.6 Install Python on openSUSE:
- 3 Installing Python on macOS / Mac OS X:
- 4 Installing Python on Mobile Devices:
- 5 Top 10 Online Python Interpreters
Installing python on windows:
Unfortunately, Windows didn’t come with Python Interpreter like Linux OS. But the Good news is to install python on Windows is not tough. Let’s Do it
Step 1 : Downloading Python Installer From Official Site
There are many ways to download Python Interpreter for windows OS.
1st Way: Download Latest Python Version for your current OS Architecture.
- Open any Browser and navigate to Python.org
- Hover to Downloads Menu and Click on Python 3.7.3, it will start your download on your local computer.
2nd Way: Download Python Version from the current release.
- Open Browser and navigate to Python Download Page for Windows.
- Click on the Latest Python 3 release – Python 3.7.3
- Scroll down to the very bottom to see more Files options according to your Windows Architecture.
- There are two options which are mostly used for Windows 32 bit or 64 bit.
- If your Windows is 64 bit ( Click on Windows x86-64 executable installer )
- For 32 bit windows ( Click on Windows x86 executable installer )
- It will start your download on your local computer.
3rd Way: Download Previous Python Version for Windows.
- Open Browser and navigate to Python Download Page for Windows.
- There is two kinds of releases (Stable or Pre).
- You can Scroll down, click on any specific version with your OS bit processor (32 or 64 bit)
- It will start your download on your local computer
Step 2 : Run Python Installer On Windows
- After downloading your desired Python Installer on your computer, double click on it to run the setup. It will pop up this dialog box.
- Click on Checkbox to add Python Path in windows.
- Click on Customize Installation.
- Check All boxes and click Next
- Choose Your desired Custom Location but i usually like to install in root C drive.
- Click Install
- Wait 4 to 10 minutes while it’s installing, you can do your other tasks as well.
Step 3: Checking Python is Installed on windows or Not
There are Many ways to check weather python is installed in your computer or not. The quickest and efficient way is to check using the command line.
- Open your Command Line (CMD) and type this command
- Use these commands to Check Only Python Version
Installing Python on Linux Operating System:
Now we are going to install and see, how can we install Python latest version of different Linux Distribution with simple steps and quickly.
Install Python on Ubuntu:
There are many chances that your Ubuntu Os has already Python Installed, but it can be Python 2 version or maybe latest one.
Step 1: Checking Ubuntu OS Version
- Checking current Version by this command
Step 2: Find-out which python versions you have on Ubuntu
Open a terminal and try these following commands:
python --version or python -V python2 --version or python2 -V python3 --version or python3 -V
Step 3: Install Latest Python Version on Ubuntu
- Python version 3.6 comes in Ubuntu 17, Ubuntu 18.04 and Ubuntu 19.04 (Above)
- Ubuntu 16.10 & 17.04 does not have python 3.6 by default, but it comes with Universe repository and you can install latest version by these commands
sudo apt-get update sudo apt-get install python3.6
- Ubuntu 14.04 or 16.04, Python 3.6 does not have python 3 as well as Universe repository, you can download and install from Personal Package Archive (PPA) by following commands:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.6
Install python on Linux Mint
To install python on Linux Mint is easy and very straight forward like Ubuntu by using PPA (Personal Package Archive).
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.7
Install python on CentOS:
CentOS is very famous Linux Distribution like Ubuntu that provides free open source, community supported and computing platform functionality with its upstream.
CentOs comes with python2.7 by default but you will miss latest python 3 functionality like f string and interpolation etc.
Step 1: Installing the Necessary Updates
It’s good practice to install updates on any Linux OS before installing the python or using it the first time.
sudo yum update sudo yum install yum-utils sudo yum groupinstall development
Step 2: Installing Python 3.7 and Pip
- Open your terminal and write this command
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm sudo yum install python37u sudo yum install python37u-pip sudo yum install python37u-devel
Step 3: Checking the version of Python in CentOS
- Open your terminal and write this command
python –V or python --version python3 –V or python3 --version
Install Python on Fedora
Fedora is a Linux distribution developed by the community-supported Fedora Project and sponsored by Red Hat. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of such technologies. Read More
Fedora also comes with python2.7 by default like CentOS and you will miss python 3 latest functionality.
To install python on Fedora.
sudo dnf install python37
Install Python on Arch Linux
Arch Linux Mostly Comes with latest Pre-installed python version. If any case your OS doesn’t show or missing the python interpreter. You can use this command in your terminal.
packman -S python
Install Python on openSUSE:
openSUSE is developed by SUSE Linux and SuSE Linux Professional. Which is a Linux distribution sponsored by SUSE Linux GmbH and other companies. It is broadly used throughout the world.
sudo zypper install -t pattern devel_C_C++
It will install all the required packages and dependencies. To install Python using Env, follow these instructions:
# Step 1. Install virtualenv git clone https://github.com/pyenv/pyenv.git ~/.pyenv echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc # Step 2. Install missing headers for python sudo zypper install readline-devel sqlite3-devel libbz2-devel # Step 3. Install the desired Python version pyenv install 3.7
Installing Python on macOS / Mac OS X:
There are a lot of ways to install python on MacOs and MacOs X, here we are going to use the recommended way by many developers which is HomeBrew. Mac Os usually comes with Python 2, it seems to be out of date now, and here we will learn how to install python 3 latest versions. Let’s Follow the steps:
Step 1: Installing Homebrew and it’s Dependencies
- Open the desired browser and navigate to Brew.sh
- Copy the code to your clipboard.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Open Terminal window and paste the complete line of code and click enter. This will begin HomeBrew Installation on your OS.
- It will take a few minutes, have some patience.
Step 2: Install Python with brew
After installing all the packages, dependencies and homebrew. Just copy this command and paste into your terminal
brew install python3
It will install the latest python version with pip3 as well.
Step 3: Checking whether python is installed on MacOs
You can earn surety about everything went correctly by testing if Python can be located from the terminal:
- Open terminal by launching Terminal.app.
- Type pip3 and click enter.
- You will see some instruction about Pip or Python. Which represents you have successfully gain python on your machine. If you see any error please go through all the above steps once again or follow the HomeBrew official documentation or let us know.
Installing Python on Mobile Devices:
To use python on mobile devices is really fun. It will help you to indulge yourself more into programming. This will help you to memorize the code which we use normally.
Install Python on Android OS using Pydroid:
If you have any Android Devices like Phones or tablets. You can easily use python on that. There a lot of options available to use python on mobile devices. In this section, we are going to use the most popular and recommended way Pydroid 3 Android App.
Pydroid 3 is the easiest way to use and powerful educational Python 3 IDE for Android.
- Pre-installed offline Python 3.7. So you don’t need any internet connection to run Python Programs and see your result. Sound Cool. Isn’t it?
- Some Popular Packages are Built-in. So you can work with like Tensorflow, Tkinter, C & C++, Kivy, Matplotlib, pygame, and Cython Support.
- Examples are given for quick code.
You can Download Pydroid 3 from Google Play
Install Python on Apple IOS using Pythonista 3:
On any Apple device (iPad, iPhone), you can easily install python. In this Article, we are going to use the most popular and recommended App named Pythonista 3.
You can Download Pythonista 3 from Apple ios Store
Top 10 Online Python Interpreters
The most interesting and useful thing to know which online interpreter are in the market. This kind of websites installs python interpreter on their cloud-based hosting so worldwide who has the link can use freely. These are some drawbacks for using an online interpreter.
- Cannot run complex Code and Examples
- Don’t Have too many packages or required packages
- Difficult to handle files
- Cannot save your code,
- Can not testing on most of the sites
For the average and quick shortcode output, these are useful sites. You can keep one or two in mind or install APP (Android or Apple) in your device.
Here is the Python Online Interpreter List:
- Python.org Online Console: www.python.org/shell
- Python Fiddle: pythonfiddle.com
- Repl.it: repl.it
- Trinket: trinket.io
- Python Anywhere: www.pythonanywhere.com
- onlinegdb: www.onlinegdb.com/online_python_interpreter
- skulpt: www.skulpt.org
- tutorialspoint: www.tutorialspoint.com/execute_python_online.php
- ideone: www.ideone.com
- pythontutor: http://www.pythontutor.com/visualize.html
Conclusion (End words):
That’s it! In this Article, we had gone through all the possible and recommended ways to install python with the specific version on the desired device. I hope you get a lot of information about python installation on various devices. Now you are ready to go for the next step to learn more in-depth about Python.