banner



How To Run Python On Windows 10

Introduction

Python is a widely used loftier-level programming language get-go launched in 1991. Since so, Python has been gaining popularity and is considered as i of the virtually popular and flexible server-side programming languages.

Unlike most Linux distributions, Windows does not come with the Python programming language past default. Yet, you lot can install Python on your Windows server or local car in just a few like shooting fish in a barrel steps.

Prerequisites

  • A system running Windows 10 with admin privileges
  • Command Prompt (comes with Windows by default)
  • A Remote Desktop Connection app (utilize if you lot are installing Python on a remote Windows server)

Python 3 Installation on Windows

Stride 1: Select Version of Python to Install

The installation procedure involves downloading the official Python .exe installer and running information technology on your organization.

The version you demand depends on what you want to do in Python. For instance, if you lot are working on a projection coded in Python version 2.6, you probably need that version. If you are starting a project from scratch, y'all have the freedom to choose.

If you are learning to code in Python, nosotros recommend you download both the latest version of Python ii and iii. Working with Python 2 enables you to work on older projects or examination new projects for backward compatibility.

Annotation: If you are installing Python on a remote Windows server, log in via Remote Desktop Protocol (RDP). Once you log in, the installation procedure is the same every bit for a local Windows automobile.

Stride 2: Download Python Executable Installer

  1. Open your spider web browser and navigate to the Downloads for Windows section of the official Python website.
  2. Search for your desired version of Python. At the time of publishing this commodity, the latest Python iii release is version iii.7.iii, while the latest Python ii release is version 2.vii.16.
  3. Select a link to download either the Windows x86-64 executable installer or Windows x86 executable installer. The download is approximately 25MB.

Notation: If your Windows installation is a 32-bit arrangement, y'all need the Windows x86 executable installer. If your Windows is a 64-fleck version, you need to download the Windows x86-64 executable installer. There is nothing to worry about if you install the "incorrect" version. You can uninstall one version of Python and install another.

Step three: Run Executable Installer

i. Run the Python Installer once downloaded. (In this example, nosotros have downloaded Python iii.7.3.)

two. Make sure you select the Install launcher for all users and Add together Python iii.7 to PATH checkboxes. The latter places the interpreter in the execution path. For older versions of Python that practice not support the Add Python to Path checkbox, see Footstep six.

three. Select Install Now – the recommended installation options.

For all recent versions of Python, the recommended installation options include Pip and IDLE. Older versions might not include such additional features.

4. The next dialog will prompt y'all to select whether to Disable path length limit. Choosing this option volition allow Python to featherbed the 260-graphic symbol MAX_PATH limit. Finer, it will enable Python to apply long path names.

The Disable path length limit choice will non affect whatsoever other system settings. Turning information technology on volition resolve potential name length issues that may arise with Python projects developed in Linux.

Pace 4: Verify Python Was Installed On Windows

  1. Navigate to the directory in which Python was installed on the system. In our case, it is C:\Users\Username\AppData\Local\Programs\Python\Python37 since we take installed the latest version.
  2. Double-click python.exe.
  3. The output should be similar to what y'all tin see below:

Note: You can besides check whether the installation was successful by typing python –V in Command Prompt. The output should brandish your installed version of Python. In our instance, information technology is "Python 3.7.iii."

Step five: Verify Pip Was Installed

If you opted to install an older version of Python, it is possible that information technology did non come up with Pip preinstalled. Pip is a powerful parcel management organization for Python software packages. Thus, make sure that you lot take it installed.

We recommend using Pip for most Python packages, especially when working in virtual environments.

To verify whether Pip was installed:

  1. Open the Start card and blazon "cmd."
  2. Select the Control Prompt application.
  3. Enter pip -V in the panel. If Pip was installed successfully, you should come across the post-obit output:

Pip has not been installed yet if you get the post-obit output:

          'pip' is not recognized as an internal or external command, Operable programme or batch file.        

If your version of Python is missing Pip, run across our commodity How to Install Pip to Manage Python Packages on Windows.

Pace half-dozen: Add Python Path to Environment Variables (Optional)

We recommend you get through this step if your version of the Python installer does not include the Add Python to PATH checkbox or if you accept not selected that option.

Setting upwards the Python path to organisation variables alleviates the demand for using full paths. It instructs Windows to await through all the PATH folders for "python" and notice the install folder that contains the python.exe file.

1. Open the Commencement menu and start the Run app.

run dialog box

ii. Type sysdm.cpl and click OK. This opens the Arrangement Properties window.

iii. Navigate to the Advanced tab and select Environment Variables.

iv. Under System Variables, discover and select the Path variable.

5. Click Edit.

6. Select the Variable value field. Add the path to the python.exe file preceded with a semicolon (;). For case, in the image below, nosotros accept added ";C:\Python34."

How to add the Variable Value durring python3 windows installation.

7. Click OK and close all windows.

Past setting this up, you lot can execute Python scripts similar this: Python script.py

Instead of this: C:/Python34/Python script.py

As you can see, information technology is cleaner and more than manageable.

Footstep 7: Install virtualnv (Optional)

You lot accept Python, and you take Pip to manage packages. At present, you need 1 last software package - virtualnv. Virtualnv enables yous to create isolated local virtual environments for your Python projects.

Why use virtualnv?

Python software packages are installed organisation-wide by default. Consequently, whenever a single project-specific package is changed, it changes for all your Python projects. Y'all would want to avoid this, and having dissever virtual environments for each project is the easiest solution.

To install virtualnv:

ane. Open the Start menu and type "cmd."

2. Select the Command Prompt application.

3. Type the following pip command in the console:

          C:\Users\Username> pip install virtualenv        

Upon completion, virtualnv is installed on your system.

Decision

In this tutorial, we detailed how to install Python 3.7.3 on Windows. If you are installing a unlike version of Python, you can wait a similar process.

To upgrade Python to a newer version, check our article how to upgrade Python to 3.9.

Recollect, cull your version carefully, make sure that you have Pip installed, and use virtual environments when developing multiple projects on a single arrangement.

Want to attempt out another new generation, server-side scripting languages? Check out How to Install Cerise on Windows ten.

Happy coding!

Was this article helpful?

Yeah No

How To Run Python On Windows 10,

Source: https://phoenixnap.com/kb/how-to-install-python-3-windows

Posted by: plylerdowits1958.blogspot.com

0 Response to "How To Run Python On Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel