Python Installation - Python: Programming Language for Beginners - Learn In A Day! (2015)

Python: Programming Language for Beginners - Learn In A Day! (2015)

Chapter 2. Python Installation

The up-to-date edition with the binaries, current source codes, documentations, latest news, etc. can be accessed at the official Python website.

Python Official Website:

Here, you can download the documentation for Python from the site. It is accessible in various formats like PDF, HTML, and PostScript.

Python Documentation Website:

How to Install Python:

Python is accessible for various platforms. You need to download only the binary code that works fine with the platform and you can install Python after that. If it is unavailable, then use a C compiler that can do manual compilation of the source code. Source code compilation gives you suppleness in terms of features required.

Python Environment Variables:




It is similar to PATH. This variable foretells the Python interpreter as to where it can locate the module files that you can import in a program. PYTHONPATH must have a Python source library directory and the directories in which your Python code is present. PYTHONPATH is sometimes set by the Python installer automatically.


It has the path for the initialization file which contains Python source codes that are executed each and every time you work on the interpreter. This file is often named in Unix, which usually has commands that can load the utilities or can modify the PYTHONPATH.


This is used in Windows OS for instructing Python to find case-insensitive matches in an import statement. You can set this to any random value for activating it.


It is an alternative search path that is embedded in PYTHONSTARTUP or PYTHONPATH directories for switching the module libraries very easy.

Running Python

Python can be run on a system in three ways:

Interactive Interpreter:

You can start by entering python and then begin programming in its interpreter by beginning from the command line on any platform that provides a command line interpreter or a shell window.

List of command line options is given in the table below:




Provide the output after debugging


Optimized byte code generation i.e. the .pyo file is generated


Don’t run the import site for searching Python paths in a startup.


Details of import statement


Disable the class based built-in exceptions

-c cmd

It runs python script sent in cmd String


Python script is run from the given file.

Script from Command-line: Calling an interpreter on your application can help you run and execute your python script in command line.

Integrated Development Environment: It is possible to run Python from a GUI too. The one thing you require is a system that supports Python.