news

How to install Python on Windows

In order for any developer or programmer to be able to use the Python language, it must be ensured that it is on his computer. If the device is running Linux or Mac OS, there is no need to download the Python language; Because it is already included with the operating system, but if the device is running the Windows operating system, then the Python language must be installed on the device, and there are several different ways to install the Python language on the Windows operating system, and each of them has certain advantages and disadvantages:

How to install Python on Windows


Full installation method

This method involves downloading Python directly from Python.org, which is the best option for professional developers who need a full-featured Python development environment, and can install from the full installer in two steps:


Step 1: Download the complete installer

Follow these steps to download the complete installer:

  1. Open a browser window on Python.org and navigate to the Downloads page for Windows, accessible here.
  2. Under "Python Versions for Windows," click the link for the latest version of Python 3 - Python 3.xx.
  3. Scroll down and select either the Windows x86-64 installer executable for 64-bit or the Windows x86 installer executable for 32-bit.


Step two: Run the installer

Once the installer is selected and downloaded, it is launched by double-clicking on the downloaded file A dialog box will appear, from which the user must customize the installation to meet his needs using the options available in the dialog, then click on “Install Now”, and among these options Four things to note about the dialog that will appear:

  • default installation path; It is located in the AppData/ directory of the current Windows user.
  • The Customize installation button can be used to customize the installation location and additional features that are installed, including pip; which helps install other Python packages, and IDLE; It is an integrated development environment for Python.
  • The checkbox (Install launcher for all users) is checked by default. This means that every user on the machine will have access to the py.exe launcher. This box can be unchecked to restrict Python to the current Windows user only.
  • Uncheck the Add Python 3.x to PATH check box By default, there are many reasons why a user might not want to use Python on their PATH, so understand the implications before checking this box.


Microsoft Store bundle method

The Microsoft Store package method for installing Python is suitable for the user who is new to Python and looking to get started quickly, as it is a simple installation of Python, suitable for running scripts and packages, and using IDLE or other development environments, requires Windows 10 You can install from the Microsoft Store in two steps:


Step 1: Open the Python application page in the Microsoft Store

Open the Microsoft Store application and search for Python, as there are multiple versions that can be selected and installed, or you can open PowerShell on the device and write the following command: "C:\>python", if the user does not have a version of Python on his system, When you press Enter, the Microsoft Store will automatically launch and move it to the latest version of Python in the Store.


Step two: Install the Python application

After selecting the version to install, follow these steps to complete the installation:

  • Click (Get).
  • Wait for the app to download, when the download is finished, the Get key will be replaced by the Install on my devices key.
  • Click on “Install on my devices” and select the devices you want to complete the installation on.
  • Click "Install Now" then "OK" to start the installation.
  • If the installation was successful, the message "This product is installed" will appear at the top of the Microsoft Store page.

To ensure that the Python language is correctly installed on the Windows system, go to the Start button, open the Command Line, write the command (python) and then click Enter, after that the version number of the Python program that was installed on the device will appear, Thus, the user can continue writing the program that he wants to implement.


Note: To properly run Python from the command prompt, you may consider changing some of the default environment variables in Windows. The installer provides an option to configure the PATH and PATHEXT variables for the user, but it can only be relied upon for a single system-wide installation. If you use multiple versions of Python regularly, consider using the Python Launcher for Windows.

Comments
No comments
Post a Comment