How To Use Python 3.6 On Windows
Introduction
Python is a widely used high-level programming language first launched in 1991. Since then, Python has been gaining popularity and is considered as one of the nearly pop and flexible server-side programming languages.
Dissimilar most Linux distributions, Windows does non come with the Python programming linguistic communication by default. However, y'all can install Python on your Windows server or local machine in just a few easy steps.
Prerequisites
- A system running Windows 10 with admin privileges
- Control Prompt (comes with Windows past default)
- A Remote Desktop Connection app (use if you are installing Python on a remote Windows server)
Python 3 Installation on Windows
Step ane: Select Version of Python to Install
The installation procedure involves downloading the official Python .exe installer and running it on your system.
The version you need depends on what you want to exercise in Python. For case, if you lot are working on a project coded in Python version two.6, you probably need that version. If you are starting a project from scratch, y'all have the liberty to choose.
If y'all are learning to code in Python, we recommend yous download both the latest version of Python 2 and 3. Working with Python 2 enables y'all to work on older projects or exam 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 process is the same as for a local Windows machine.
Stride ii: Download Python Executable Installer
- Open up your web browser and navigate to the Downloads for Windows section of the official Python website.
- Search for your desired version of Python. At the time of publishing this article, the latest Python 3 release is version 3.seven.iii, while the latest Python 2 release is version 2.7.16.
- 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 system, you need the Windows x86 executable installer. If your Windows is a 64-bit version, y'all demand to download the Windows x86-64 executable installer. There is nothing to worry well-nigh if you install the "wrong" version. You can uninstall one version of Python and install another.
Stride 3: Run Executable Installer
i. Run the Python Installer once downloaded. (In this instance, we have downloaded Python three.seven.three.)
two. Make sure you select the Install launcher for all users and Add Python 3.7 to PATH checkboxes. The latter places the interpreter in the execution path. For older versions of Python that do non support the Add Python to Path checkbox, see Step 6.
3. 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 you to select whether to Disable path length limit. Choosing this option will let Python to bypass the 260-character MAX_PATH limit. Effectively, it will enable Python to use long path names.
The Disable path length limit option will not affect whatsoever other system settings. Turning it on volition resolve potential name length issues that may arise with Python projects adult in Linux.
Pace 4: Verify Python Was Installed On Windows
- Navigate to the directory in which Python was installed on the arrangement. In our example, information technology is C:\Users\Username\AppData\Local\Programs\Python\Python37 since we have installed the latest version.
- Double-click python.exe.
- The output should exist similar to what yous can see beneath:
Note: You can also cheque whether the installation was successful by typing python –Five in Command Prompt. The output should display your installed version of Python. In our case, it is "Python 3.vii.three."
Step v: Verify Pip Was Installed
If yous opted to install an older version of Python, it is possible that it did not come up with Pip preinstalled. Pip is a powerful package management system for Python software packages. Thus, make sure that you have information technology installed.
We recommend using Pip for nigh Python packages, especially when working in virtual environments.
To verify whether Pip was installed:
- Open the Starting time bill of fare and type "cmd."
- Select the Command Prompt application.
- Enter
pip -Fivein the panel. If Pip was installed successfully, yous should see the following output:
Pip has not been installed even so if y'all become the following output:
'pip' is not recognized equally an internal or external command, Operable programme or batch file. If your version of Python is missing Pip, see our commodity How to Install Pip to Manage Python Packages on Windows.
Step half-dozen: Add Python Path to Environment Variables (Optional)
We recommend yous get through this step if your version of the Python installer does not include the Add together Python to PATH checkbox or if you have non selected that option.
Setting up the Python path to system variables alleviates the need for using full paths. It instructs Windows to look through all the PATH folders for "python" and find the install binder that contains the python.exe file.
i. Open up the Beginning menu and outset the Run app.
ii. Type sysdm.cpl and click OK. This opens the Organization Backdrop window.
3. Navigate to the Avant-garde tab and select Environs Variables.
4. Nether Organization Variables, find and select the Path variable.
5. Click Edit.
half dozen. Select the Variable value field. Add the path to the python.exe file preceded with a semicolon (;). For example, in the prototype beneath, nosotros have added ";C:\Python34."
7. Click OK and close all windows.
By setting this up, yous can execute Python scripts similar this: Python script.py
Instead of this: C:/Python34/Python script.py
As you lot can run into, it is cleaner and more manageable.
Footstep seven: Install virtualnv (Optional)
Y'all have Python, and you have Pip to manage packages. At present, you need 1 last software package - virtualnv. Virtualnv enables you to create isolated local virtual environments for your Python projects.
Why use virtualnv?
Python software packages are installed system-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 separate virtual environments for each project is the easiest solution.
To install virtualnv:
one. Open up the Start card and type "cmd."
2. Select the Command Prompt application.
3. Type the following pip control in the console:
C:\Users\Username> pip install virtualenv Upon completion, virtualnv is installed on your system.
Conclusion
In this tutorial, nosotros detailed how to install Python 3.7.3 on Windows. If y'all are installing a dissimilar version of Python, you tin can wait a similar process.
To upgrade Python to a newer version, check our article how to upgrade Python to 3.9.
Call up, choose your version carefully, make certain that y'all accept Pip installed, and employ virtual environments when developing multiple projects on a single system.
Want to try out another new generation, server-side scripting languages? Check out How to Install Ruby on Windows ten.
Happy coding!
Was this article helpful?
Yes No
Source: https://phoenixnap.com/kb/how-to-install-python-3-windows
Posted by: yatestraid1937.blogspot.com

0 Response to "How To Use Python 3.6 On Windows"
Post a Comment