Getting Python on the Appliper ation
Categories: Python
The mostup-to-date and current source code, binaries, documentation, news,etc., is available on the official website of Pythonhttps://www.python.org/
You can downloadPython documentation from https://www.python.org/doc/. Thedocumentation is available in HTML, PDF, and PostScript formats
Installing Python
Pythondistribution is available for a wide variety of platforms. You needto download only the binary code applicable for your platform andinstall Python.
If the binary codefor your platform is not available, you need a C compiler to compilethe source code manually. Compiling the source code offers moreflexibility in terms of choice of features that you require in yourinstallation.
Here is a quickoverview of installing Python on various platforms −
Unix and LinuxInstallation
Here are thesimple steps to install Python on Unix/Linux machine.
Open a Web browserand go to https://www.python.org/downloads/.
Follow the link todownload zipped source code available for Unix/Linux.
Download andextract files.
Editing theModules/Setup file if you want to customize some options.
run ./configurescript
make install
This installsPython at standard location /usr/local/bin and its libraries at/usr/local/lib/pythonXX where XX is the version of Python.
WindowsInstallation
Here are the stepsto install Python on Windows machine.
Open a Web browserand go to https://www.python.org/downloads/.
Follow the linkfor the Windows installer python-XYZ.msi file where XYZ is theversion you need to install.
To use thisinstaller python-XYZ.msi, the Windows system must support MicrosoftInstaller 2.0. Save the installer file to your local machine and thenrun it to find out if your machine supports MSI.
Run the downloadedfile. This brings up the Python install wizard, which is really easyto use. Just accept the default settings, wait until the install isfinished, and you are done.
Setting path atUnix/Linux
To add the Pythondirectory to the path for a particular session in Unix −
In the csh shell −type setenv PATH "$PATH:/usr/local/bin/python" and pressEnter.
In the bash shell(Linux) − type export PATH="$PATH:/usr/local/bin/python"and press Enter.
In the sh or kshshell − type PATH="$PATH:/usr/local/bin/python" and pressEnter.
Note −/usr/local/bin/python is the path of the Python directory
Setting path atWindows
To add the Pythondirectory to the path for a particular session in Windows −
At the commandprompt − type path %path%;C:\Python and press Enter.
Note − C:\Pythonis the path of the Python directory