Setting up/Installing Python

Setting up Python is the first thing one should do when learning python. The installation process differs for different operating systems.
In this post, We will be looking at Installing Python for every operating system in detail.
To create and run any Python program, we need two things
  1.  A/Any text editor to write and edit programs(even notepad is enough and can do the job).
  2.  The Python Interpreter to execute the programs.
We are going to install Python Interpreter first. Note that Python Interpreter comes with its own text editor as a bundled package. So we don't have to worry about text editor.
A text editor tailored specifically for a particular programming language combined with its Compiler/Interpreter and all the necessary tools required by a developer is known as Integrated Development Environment(IDE).

Installing Python in Windows:

Follow the below steps to install Python Interpreter in windows
  1.  Go to Python's official website's download section.
    Python's Official Website
  2. The page automatically detects the Operating System you are using and downloads the appropriate package for your operating system when you press the download button. 
  3. Run the .exe file.
  4. In the installer window,
    Python Installer Window
    • Make sure you select the 'Add Python 3.8 to PATH option. You definitely might need it later.
    • Select 'Install Now' Button.
  5. It is done when the installation process is complete and the Python Interpreter is now installed on your computer.
  6. Go to Start and search for 'IDLE' which is Python's own IDE. 

Installing Python in Linux:

  1. Python comes pre-installed in most of the Linux distributions, so you can proceed to install IDLE. You can check if Python is installed in your system by executing the following command in the Terminal

    python --version

  2. If it shows the version, you have Python already installed in your system.
  3. If it doesn't, then execute the following commands on your Terminal, try the following

    $ sudo apt-get update
    $ sudo apt-get install python3.6

  4. It should install Python now. Now try running the command on step 1 again. It should give you the version of Python.
  5. If it doesn't then try the methods given here.
  6. Now given that you have installed Python, let's install IDLE.
  7. Run the following command on the terminal to install IDLE

    sudo apt install idle3

  8. Now you have IDLE installed on your system. 

Installing Python for MacOS:

Just like linux, newer versions of MacOS comes with python pre-installed. but still you'll have to check it and reinstall it if required.
  1. Download the installation Binary file from Python's official website's download section.
  2. Install python from the package(Drag into Applications Folder)
  3. After it is done, You have Python and IDLE installed in your system.
 Now you have Python installed in your system. It's time to write some basic code.

Comments

Popular posts from this blog

Time Complexity of Basic functions in Python

Variables in Python

Lists in Python