Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   




PYTHON - INSTALLATION


To run Python Programms in you PC, you need to install Python first.


Installation of Python for Windows OS


Below are the steps to install Python on Windows OS :


  1. Goto the below link and download the latest version of Python.

    https://www.python.org/downloads/
    java_Collections
    java_Collections
    java_Collections
  2. Then double click on the exe file and install Python in your PC.
    java_Collections
    java_Collections
    java_Collections
  3. Once Python is Installed, you can open the Command Prompt and Type 'python --version'.

    If the version is shown then Python is successfully installed in your system.

    java_Collections

Installation of Python for MAC OS


Below are the steps to install Python on MAC OS :


  1. Goto the below link and download the latest version of Python.

    https://www.python.org/downloads/macos/
    Python - Installation
    Python - Installation
  2. Then click on the 'pkg' file to install Python.
    Python - Installation
    Python - Installation
    Python - Installation
    Python - Installation
    Python - Installation
    Python - Installation
    Python - Installation
    Python - Installation
  3. Once Python is Installed, you can open the Command Prompt and Type 'python --version' or 'py --version'.

    If the version is shown then Python is successfully installed in your system.

Now, that we have Installed Python. Let us see how we can run a Python Program.


Running a Python Program in Windows OS


Let us write a Program that will print 'Hello World'.


  1. The first thing we will do is open 'Notepad' in Windows OS.

    java_Collections
  2. Once 'Notepad' is opened. You can type the lines of code there.

    And now, since we are trying to print 'Hello World'. One line of code is enough in Python.

    print("Hello World")


    java_Collections
  3. Then save with '.py' extension. Say 'FirstProgram.py'.

    java_Collections
  4. Then run using the command 'python FirstProgram.py' or 'py FirstProgram.py'.

    java_Collections

And we are done.


Running a Python Program in MAC OS


Let us write a Program that will print 'Hello World'.


  1. The first thing we will do is open 'TextEdit' in MAC.

    Python - Installation
  2. Once 'Notepad' is opened. You can type the lines of code there.

    And now, since we are trying to print 'Hello World'. One line of code is enough in Python.

    print("Hello World")


    Python - Installation
  3. Then save with '.py' extension. Say 'FirstProgram.py'.

    Python - Installation
  4. Then run using the command 'python FirstProgram.py'.

And we are done.