In this part of the Python Basics tutorial, we will learn how to install python on Windows and Linux.
Alternatively, you can use Jupyter notbooks after installing Anaconda.
How to install python on Windows
Use the link below to go to the windows downloads page for python.
We will now click on the Latest Python 3 Release – Python 3.8.2 link.
Click on Windows x86-64 executable installer for 64-bit or Windows x86 executable installer for 32-bit. Run the installation file after downloading it.
Make sure that you check Add Python 3.8 to PATH.
After this gets installed, we will check if python is properly installed on our system.
To do this, open the command prompt and type
This should show the version of python installed (Python 3.8.2 in this case).
You can launch the python shell by typing
python in the command prompt.
How to install Python on Linux
Usually python is pre installed in Linux systems. Showing the steps below in case it isn’t. I am using Ubuntu distribution of Linux here as an example.
Before we install python, we will update the package lists. This can be done by typing the following command in terminal.
sudo apt-get update && sudo apt-get upgrade -y
After this, type
sudo apt install python3 to install python3.
python3 --version to see it it is properly installed.
Now we will move to part 3 of the tutorial where we will learn about the syntax of python.
Install python using Anaconda
Download Anaconda here: https://www.anaconda.com/products/individual
Anaconda has an open-source Individual Edition which is the easiest way to perform data science and machine learning activities using Python on a single machine.
Click Launch (or install first, if not already installed) to start Jupyter Notebooks.
This will open a new window in your browser where you can start creating new notebooks and learn python.