How to Install Python on Windows
Python was created by Guido van Rossum and first released in 1991.
It is an open source, interpreted programming language, and is simple to use, readable and extensible. You can split your program into modules that can be reused in other Python programs.
Python supports several paradigms, such as object-oriented, functional, and procedural with the support of a large comprehensible library.
The latest version of Python is 3.9.0, released on Oct. 5, 2020. It contains many new features and optimization. This is the first version of Python to default to the 64-bit installer on Windows. The installer now also actively disallows installation on Windows 7. Python 3.9 is incompatible with this unsupported version of Windows.
If you go to the page: https://www.python.org/downloads/windows/, you will find all releases of Python. The installation process is the same, regardless of the version.
The Python installers for the Windows platform usually include the entire standard library and often also include many additional components. For Unix-like operating systems Python is normally provided as a collection of packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components.
There are a number of different installers available for Windows, each with certain advantages and disadvantages.
Step 1: Open your browser window and navigate : https://www.python.org/downloads/
Step 2: Click on button download python 3.9.0 to download Python Executable Installer for Windows. It will start downloading the installer, which is around 27 MB in size.( If you have a lower version of Windows, please click Downloads menu button and select a specific version from the downloads page.)
Step 3: Once finished with the download, double click on the downloaded file to run the installer.
Step 4: The setup windows shows following dialog window with two installation options:
A. Install Now
B. Customize Installation
A. If you select “Install Now”:
Step 5: The setup process will be shown in a Python 3.9.0(64-bit) Setup pop-up window.
Step 6: After successful completion of installation the following popup window will be shown with Setup was successful message.
This dialog box also gives you the option to Disable path length limit.
Clicking the “Disable path length limit” option removes the limitation on the MAX_PATH variable. This change won’t break anything, but will allow Python to use long path names.
Removing the MAX_PATH Limitation
Windows historically has limited path lengths to 260 characters. This meant that paths longer than this would not resolve, and errors would result; this is termed as MAX_PATH Limitation. In the latest versions of Windows, this limitation can be expanded to approximately 32,000 characters.
You must save the file python-3.9 exe somewhere on your computer in case you need to reinstall, modify the settings or uninstall python.
B. Customize installation: This option allows you to select the features to install, the installation location and other options or post-install actions. If you select customized installation:
Step 5: Step 1 to 4 would be same, but as you select the customized installation, the following dialog box will appear.
This window provides a list with several optional features. You may select the respective checkboxes as per the requirement. The meaning of each option is as follows:
Step 6: After clicking on Next button one more dialog window appears on the screen which helps developers to check or uncheck additional features. This page provides 7 advance options:
After selecting the required advance options, click on Install button.
After successful completion of installation, the following popup window will be shown with Setup was successful message.
Once Python has been installed, you can add or remove features through the Programs and Features tool that is part of Windows. Select the Python entry and choose “Uninstall/Change” to open the installer in maintenance mode.
“Modify” allows you to add or remove features by modifying the checkboxes – unchanged checkboxes will not install or remove anything. Some options cannot be changed in this mode, such as the install directory; to modify these, you will need to remove and then reinstall Python completely.
“Repair” will verify all the files that should be installed using the current settings and replace any that have been removed or modified.
“Uninstall” will remove Python entirely, with the exception of the Python Launcher for Windows, which has its own entry in Programs and Features.
The definition of “PATH” by Wikipedia is “PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting”
In Windows %PATH% is a variable which provides a list of directory names separated by semicolon(;). When we enter a command on command shell , the system will search in current windows directory and after that it searches in path. It actually looks for a filename in the path which matches with the command you have given. Once it finds the matching executable file it loads the new process and gets executed.
The Python launcher for Windows is a utility which helps in locating and executing different Python versions. It allows scripts (or the command-line) to indicate a preference for a specific Python version, and will locate and execute that version.
Unlike the PATH variable, the launcher will correctly select the most appropriate version of Python. It will prefer per-user installations over system-wide ones, and orders by language version rather than using the most recently installed version.
The launcher was originally specified in PEP 397.
A Python launcher is a single executable which uses a number of heuristics to locate a Python executable and launches it with a specified command line.
The launcher allows Python scripts or the Windows command-line to specify a particular Python version and will locate and launch that version.
https://www.python.org/doc/: Browse the docs online or download a copy of your own
https://www.python.org/doc/versions/: document release by version
We hope this blog “How to install Python on Windows” would help you during the Python installation process. For additional information you can visit the official site of Python: https://www.python.org
Research & References of How to Install Python on Windows|A&C Accounting And Tax Services
Source