Python is widely used as a high-level programming language launched in 1991. Since then, Python has gained popularity, and it is considered one of the most flexible and popular server-side programming languages. It is a great choice to pursue a Python certification course.
You can install Python on your local machine or Windows server in a few easy steps.
Select Version to Install
The installation procedure includes downloading the official Python .exe installer and running it. As a Python developer, you have to make the decision.
The version you need depends entirely on what you need to do in Python. If you are studying to code in Python, you must download both Python 2 and 3. Working with Python 2 helps you to test new projects for backward compatibility.
Download Python Executable Installer
- Open your web browser
- Downloads for Windows section of the standard Python website.
- Search for your desired version of Python.
- Download it
Run Executable Installer
- Run the Python Installer once it is downloaded.
- Ensure that you select the Install launcher for all users and add Python to path checkboxes.
- Select Install Now
- The following dialogue will prompt to select whether to Disable the path length limit.
Using it will resolve potential name length issues that may arise with Python projects developed in Linux.
Verify Python Installation
Navigate to the directory in which you have installed Python on your system. In our case, it will be C:\Users\Username\AppData\Local\Programs\Python\Python37 as we have installed the latest version.
Double-click python.exe. And verify python installation.
Verify Pip Installation
If you have opted to install an older version of Python, it is possible that it does not have Pip preinstalled. It is a great package management system for Python software packages. Thus, make sure that you have Pip installed.
Add Python Path to Environment Variables
We would recommend you go through this step if the version Python you installed does not include the add Python to the path checkbox or if you have not selected that option.
Setting up the Python path to system variables alleviates the need for using full paths. It directs Windows to look through all the PATH folders and find the install folder that contains the python.exe file.
- Open the Start menu and
- Start the Run app in a run dialog box.
- Type sysdm.cpl and click OK. This opens the System Properties window.
- Search through the Advanced tab and select Environment Variables.
- Under System Variables, select the Path variable.
- Click Edit.
- Select the Variable value field and add the path to the python.exe file.
- Click OK and close all windows.
By setting this up, you can now n execute Python scripts like this: Python script.py
Instead of: C:/Python34/Python script.py
Install virtualenv (This step is optional)
You have Python and Pip to manage packages. Now, you need just one last software package – virtualenv. It helps you to create isolated local virtual environments for your Python projects.
Why use virtualenv?
By default, Python software packages are installed system-wide. Whenever a single project-specific package is modified, it changes for all your Python projects. If you want to avoid this, then having separate virtual environments for each of the projects is the simplest solution.
How to install virtualenv:
- Open the Start menu and type cmd.
- Select the Command Prompt application.
- Type the pip command mentioned below in the console:
- C:\Users\Username> pip install virtualenv
On completion, virtualenv is installed on your system.
Conclusion
Python is a general-purpose and powerful programming language. As a Python developer, you will find it to be a great language because it is concise and easy to read. The demand for python programmers is increasing rapidly. The London School of Emerging Technology is a great learning platform that offers the best python certification courses. Join LSET and learn with the help of expert guidance and excel in your career.