Welcome to Sulekha IT Training.

Unlock your academic potential here.

“Let’s start the learning journey together”

Do you have a minute to answer few questions about your learning objective

We appreciate your interest, you will receive a call from course advisor shortly
* fields are mandatory

Verification code has been sent to your
Mobile Number: Change number

  • Please Enter valid OTP.
Resend OTP in Seconds Resend now
please fill the mandatory fields including otp.

Start learning Python – Installation, Compilation, Running Script

  • Link Copied

What is python used for?

Python is a high-level programming language, Created by Guido van Rossum and first released in 1991. Learn from basics to scripts, installation, applications, testing and more from this content. This content is aimed at delivering a knowledge about python, its uses installation and run.

The top five uses of python are mentioned below:

                                     I.            Software development- for build control, testing and management of codes Python helps developers in developing new software’s using Scions, Buildbot and Apache Gump, Roundup or Trac.

                                    II.            Business application- Python, being one of the high-level language has helped develop many E-commerce and ERP systems. Dropbox, Spotify and google has used Python in their application development.

                                   III.            Web development- Python’s standard library supports frameworks and protocols like HTML, XML, JSON, E-mail processing, FTP, IMAP, and other Internet protocols., which in turn helps in the web development. Django and Flask are the two famous web development frameworks of python.

                                   IV.            Desktop GUI- plenty of packages are available in Python to design the Desktop GUI, depending upon the need, the required package is chosen. Some of the popular packages are PyQt, PySide, WxPython, Kivy.

                                    V.            Machine learning- using scikit-learn and TensorFlow from Python library some of the major machine learning algorithms are build.

 How to run python script?

Under different OS platforms different steps are followed to run python script, for the top three OS platforms follow the below steps:

Windows

  • Open Command line:   Start menu -> Run  and type cmd
  • Type:   C:python27python.exe
  • Note: This is the default path for Python 2.7. If you are using a computer where Python is not installed in this path, change the path accordingly.

Mac OS X

  • Open Command line:   Finder -> Go menu -> Applications -> Terminal
  • Type: python

Linux

  • Open a command prompt (e.g. xterm)
  • Type: python

How to compile python script?

There are different ways to compile a python script some of them are:

       1. Using CX_Freeze

       2. Using PyInstaller

Others techniques involve using commands like

       1. python "hello.py" and

       2. python -m py compile fileA.py fileB.py fileC.py

But before using the technique a., try to make your script executable by adding #!/usr/bin/env python to the top of the script and the file executable by using the command chmod +x hello.py.

How to install python?

Step 1)

To install Python visit the official website of Python http://www.python.org/downloads/ and choose your RESPECTIVE version in convenience with your computer configuration. For example Python version 3.6.3. 64 bit/32 bit.

 

How to install python step 1

Step 2)

 Once the download gets completed, run the exe file to install Python. Now click on the Install Now button.

Step 3)

Once the installation process begins, it will ask for the destination, to where it should be installed, choose the location and the installation process takes a few minutes to get completed

 

How to install python step 2

 

Step 4)

Once the installation is completed, the setup will get successful, then close the setup. Now you are all set to use python.

 

How to install python step 3

 

If you want to install the next version of Python, you can go ahead and run the setup file.

 In the pop-up screen. Select the add python 3.6 to path to add the next version.

Next a dialog box appears with “Disable path length limit” option which removes the limitation on the MAX_PATH variable. Select or unselect it according to your requirement.

 

How to install python step 4

 

                         How to install python 2?

Follow the following steps to install python 2 in your windows:

Step 1:

Visit www.python.org/downloads and click on ‘Download Python 2.714”.

Step 2:

Now run the downloaded file and select the destination

 

How to install python 2 step 1

Step 3:

The installation will begin in a few seconds, once it gets completed, click finish

 

How to install python 2 step 2

How to install python 3?

To install the python 3 on your windows, the following steps needs to be executed:

Step 1:

  • Choose the right version you want to be downloaded in the download section of python website.
  • Select either the Windows x86-64 executable installer or Windows x86 executable installer. (The download file is around 25MB.)

 

How to install python 3 step 1

 

Step 2:

Once the file gets downloaded, run the Python Installer

Select the Install launcher for all users and add Python 3.7 to PATH checkboxes.

Step 3:

Select install now

Step 4:

In the next dialog box select whether to disable path length limit. It will enable Python to use long path names.

 

How to install python 3 step 2

 

Step 5:

Navigate C:UsersUsernameAppDataLocalProgramsPythonPython37 since we have installed the latest version.

Double-click python.exe.

 

How to install python 3 step 3

 (Or)

Type python –V in the Command Prompt. The output should display your installed version of Python that you have installed.

 

Step 6:

In the command prompt type pip -V in the console. If Pip was installed successfully, you will see the following outputnow you are all set to use the python 3 in your windows.

 

How to install python 3 step 4

 

How run python in Linux?

Usually Linux machines will have Python 2.5 installed in it, all you got to do is to

  • Start the file with a shebang and use

#!/usr/bin/python

  • From there make it executable with

$ chmod +x filename.py

  • Then you can run it with the command:

$./filename.py

Note: it works only for single files.

Now you can easily run python in Linux.

Take the next step toward your professional goals

Talk to Training Provider

Don't hesitate to talk to the course advisor right now

Take the next step towards your professional goals in Python

Don't hesitate to talk with our course advisor right now

Receive a call

Contact Now

Make a call

+1-732-338-7323

Take our FREE Skill Assessment Test to discover your strengths and earn a certificate upon completion.

Enroll for the next batch

Related blogs on Python to learn more

Latest blogs on technology to explore

X

Take the next step towards your professional goals

Contact now