Python - Environment Setup

4 0 0
                                    


Python – Environment Setup

is available in several locations, including Linux and Mac OS X. We will understand how to solve the Python environment.

Local Environment Setup:

Open the computer window and type "Python" to find out if it has already been installed and the type specified.

Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX, etc.)Win 9x/NT/2000Macintosh (Intel, PPC, 68K)OS/2DOS (multiple versions)PalmOSNokia mobile phonesWindows CEAcorn/RISC OSBeOSAmigaVMS/OpenVMSQNXVxWorksPsionPython has also been ported to the Java and .NET virtual machinesGetting Python:

The most recent new status quo, options, documents, newspapers, etc. can be found at the official Python site at https://www.python.org/
You can download the Python Document at https://www.python.org/doc/. Documents are available in HTML, PDF and PostScript formats.

Installing Python:

Distribution of Python is available at different levels. You just need to download the optional number connected to your machine and install Python.
If your machine number is not available, you will need C compiler to collect a copy of the code. Co-ordinating the code gives you more flexibility in selecting the resources you need to install.

Enroll Now:

Here is a quick overview about Python installation on different stages –

Unix and Linux Installing:

Here are some easy steps to install on Python on Unix / Linux.

Open the web and access the https://www.python.org/downloads/.Follow the diagram to print the published print code for Unix / Linux.Bring and extract files.Edit files / folders if you want to set some options.Use the ./configure textMakeMake installation

This installs Python in default / usr / site / bin environment and / / pythonXX usr / local / V, where XX is a version of the praying.

Windows Installation:

Here are the steps to install Windows Python.

Open the web and access the https://www.python.org/downloads/.
Follow the link to the Python-XYZ.msi file for Windows installers, where XYZ is the type you need to install. To use the XYZ.msi installation, the Windows system must support Microsoft Installer 2.0. Save the installation file for your local machine, and then turn it around to find out if your machine can support MSI. Make the downloaded file. This will bring the Python Sodium, which is really easy to use. Just accept the usual settings, wait until it is installed and ready.Installing Macintosh:

The latest Python client has been installed, but it may be for several years. See http://www.python.org/download/mac/ for instructions on how to get the current version, plus additional equipment to support development on a Mac. For Mac OS earlier than Mac OS X 10.3 (released in 2003), MacPython is available.
Jack Jansen maintains that you can have full access to all the documents on the website – http://www.cwi.nl/~jack/macpython.html. You can get full details on installation to install Mac OS.

Enroll Now:

PATH locations:

Applications and other operating files may contain several calls, so operational systems provide a way to search for a list of operating systems that are looking for implementation.
The road is stored in variable variables, which is a series called the operating system. This assessor includes the information available in the room and other programs.
The path to change is called PATH in Unix or Path in Windows (Unix is ​​a very important, Windows is not).
In Mac OS, installers opened the road details. To request the Python interpreter for any special name, you must include the Python booklet on your route.

Description of Unix / Linux path:

In addition to Python's list of special events in Unix –

Csh category – type "CEV" type "$ PATH: / usr / local / bin / python" and then press Enter.In Linux, the PATH export type: "$ PATH: / usr / area / bin / prayed" and the media.Sh line or ksh – type PATH = "$ PATH: / usr / local / bin / python" and then press Enter.Remember – / usr / local / bin / python is the register of PythonMake Windows Path:

To add Python's book to a special account of Windows –
When you want the command, enter the% path path%; C: \ Python and press ENTER.
Remember – C: \ Python is the Python book

Python Environment Variable:

Here are some important variables that can be identified in Python –

PYTHONPATH

It has a role similar to PATH. This variable tells the Python interpreter where to locate the module files imported into a program. It should include the Python source library directory and the directories containing Python source code. PYTHONPATH is sometimes preset by the Python installer.

PYTHONSTARTUP

It contains the path of an initialization file containing Python source code. It is executed every time you start the interpreter. It is named as .pythonrc.py in Unix and it contains commands that load utilities or modify PYTHONPATH.

PYTHONCASEOK

It is used in Windows to instruct Python to find the first case-insensitive match in an import statement. Set this variable to any value to activate it.

PYTHONHOME

It is an alternative module search path. It is usually embedded in the PYTHONSTARTUP or PYTHONPATH directories to make switching module libraries easy.

Running Python:

There are three different ways to start Python –
Interactive Interpreter:

You can start Python from UNIX, DOS or other systems that provide emergency windows or windows.
Enter Python in the Command Line.
Begin to request an intermediate interpreter immediately.

$python # Unix/Linuxorpython% # Unix/LinuxorC:> python # Windows/DOS

Here is a list of all the options available –

Sr.No.Option & Description1-d

It provides debug output.

2-O

It generates optimized bytecode (resulting in .pyo files).

3-S

Do not run import site to look for Python paths on startup.

4-v

verbose output (detailed trace on import statements).

5-X

disable class-based built-in exceptions (just use strings); obsolete starting with version 1.6.

6-c cmd

run Python script sent in as cmd string

7file

run Python script from given file

Script from the Commend Line:

A Python note can be managed via the telephone line, encoding the interpreter, as follows:

$python script.py # Unix/Linuxorpython% script.py # Unix/LinuxorC: >python script.py # Windows/DOSIntegrated development Environment:

You can also manage Python one of the user interface interfaces (GUI) if you have GUI application process which supports Python.

Unix – IDLE is the first name of the IDE in Python.Windows – PythonWin is the first Python Windows interface and IDE with GUI.Macintosh – The Macintosh section of Python, along with IDLE IDLE, is available at the most important site, which can be viewed on MacBinary or BinHex files.

If you do not correctly adjust the environment, you can get help from the scheme manager. Make sure the Python climate is properly designed and well functioning.
Particular attention – All the examples mentioned in the following chapters are carried out using version 2.4.3 Python which can be found on CentOS of Linux.

To getting expect level training for Python training in your Location – | | | | |

You've reached the end of published parts.

⏰ Last updated: Jan 09, 2019 ⏰

Add this story to your Library to get notified about new parts!

Python Training in BangaloreWhere stories live. Discover now