Python is a widely used interpreted high-level programming language. Since the demand for python is increasing nowadays, it is considered the most popular and manageable server-side programming language. Websites and software built-in python are helpful for most automation technology such as task automation, data analysis, machine learning, operating systems, web development, AI, visualization, mobile application development, and multi-player games.
Unlike most Linux operating systems, Windows doesn’t have any inbuilt distributions on which python programming can be performed. So, you have a choice to install Python on your Windows version 10 easily.
This guide basically lets you know the simple steps and easiest way to install Python on your Windows 10 operating system. Let’s get started!
Step by Step Process to install Python on Windows 10
Here are the steps that you need to follow carefully for installing the Python software on your Windows 10.
Step 1 Choose the Python Version you want to Install
- In the first installation process, download the official installer Python .exe and run it on your system.
- The Python version completely relies on the type of work you want to do on your OS. For example, if you want to complete an already started project build in the 2.6 python version, you need the same. Else, if you have the choice to opt for any version to start your project from scratch.
- If you want to install Python for learning purposes, then it is recommended to install both versions 2 and 3. This is because the 2 versions enable you to work on the old projects and be compatible with new ones.
Step 2 Download and Install Python Executable Installer
- To download the python on your system. You first need to open the web browser on your system. In the Windows section of the official python site, navigate to the downloads.
- Now search for versions of python you need to download. You have choices of python version 3.7.3 and python version 2.7.16.
- After choosing the Python version, click on the link to download with executable Window x86-64 or only x86 installer.
Step 3 Complete Installation Process
- Run downloaded Python installer.
- Check you have marked the Install launcher for all your users. In the next step, add python selected version to PATH checkboxes. The last thing is that place the interpreter in the execution path.
- Click on Install and proceed with the installation process.
Pip and IDLE are recommended to install to execute and run your projects for all current or latest python versions. These features are unavailable in the old Python Versions.
Next, a dialog box prompts on your screen to select whether you need to extend or disable the path length limit. Selecting this option will enable the programming language to bypass the maximum characters up to 260 in the Max_PATH limit. In simple words, you can use the long path name for your python.
Note: Disable path length limit option won’t affect other configurations of your system. If you turn on this option, it resolves all the issues related to potential name length that can probably arise with Linux build Python projects.
Step 4 Verify the installation of Python on Windows.
- Next, navigate to the directory where you have installed the Python in your system. For example:
- Now double click on the extension of python that seems like Python.exe
- Then you will get the final output
Step 5 Verify the Pip Installation.
Pip is not installed and comes with the older Python versions. It is a powerful package management system for Python Software Packages. Thus, while installing the newest version, ensure that the Pip works efficiently in the virtual environment.
For the Pip Installation verifications, follow these steps one by one.
- In the menu bar, type “cmd.”
- Click on Command Prompt Applications
- In the search console, enter Pip- V
- Once Pip is successfully installed, you can see the output on your computer screen.
Step 6 Start Running Python
You can go through the given step if you have never installed a Python installer in your PATH checkbox. Also, if you have not selected that option.
The primary goal for setting the Python path is to mitigate the need for employing the entire path. It direct window to look for all the available PATH folders for “Python” and identify the related folders containing python extension.
- In your system, start the menu bar and run the app.
- Type system.cpl and Click the Ok button. This command opens the System properties.
- Navigate to the Advanced tab and choose the variable environment.
- Under System Variables, identify and choose the path variable
- Then, click option Edit in the next step
- Select the Files, namely Variable Value, and then add an extension of python.exe along with a semicolon. For example: “;C:\Python34.”
- Now tap on the Ok button and close all the windows.
- By following these steps, your python is finally installed. So, your software is ready to execute python scripts.
Instead of this, you can even follow the command such as
It seems like more clear, simple, and manageable.
How to install Virtualenv on Windows 10?
After Python installation, you have to install Virtualnv software on your Windows 10 operating system. This software allows you to create an independent local virtual environment for your extensive projects built on Python language.
To install Virtualnv, follow the simple steps one by one:
- In your system, open the Main Menu and type Commands “cmd.”
- Click on the Command Prompt application.
- In the Search Console space, type the following pip command.
C:\Users\Username> pip install virtualenv
- Once you complete the command process, you can ensure the Virtualnv software is successfully installed on your system.
How to install MySQL on Windows 10 for Python?
You can install the MySQL Connector for Python on Windows in two ways:
- Either installing the Source Code Distribution.
- Or you can install Built Distribution that also called MSI installer.
- Firstly, install MySQL Connector for Python using the pip Commands that are mentioned above in this post.
- Secondly, you can install MySQL Connector for Python by using the Source Code(by downloading the ZIP or TAR file). Download the file and extract them to
- At last, you can either use the Built Distribution. It is a complete package in which many native packing formats are created to intend for the specified programs.
How to install OpenCV on Windows 10 for Python?
To know the steps you can follow to install OpenCV on Windows 10 for Python, stay with us:
- First, Download the OpenCV
- Secondly, Download OpenCV-contrib and unzip the files on the same folder.
- Open the Command line and type the code git clone (https://Wisesolution.com/opencv/opencv_contrib.Wisesolution)
- In the Next Step, download and install the Visual Studio 2019
- Install Python Development Environment in your Visual Studio 2019
- Install CMake for an easy and quick compilation process
- In General CMAKE Overview, you will see the search box, type source code to create CMAKE GUI.
- Next, set up CMAKE Inputs using the source code where you have unzipped the OpenCV files. It looks like
- Next, type the source code or path address where Visual Studio Project files and newly built binaries files will be saved. The path address looks like
- In the Final Step, an overview of the Flags for OpenCV installation.
If you are looking to install Python in Ubuntu then don’t forget to check out our step by step guide on How to install Python in Ubuntu
In this guide, we have mentioned the steps for Python, MySQL, OpenCV installation process for Windows 10. If you want to install a different Python version, then you can expect a slight change in the code. But you need to follow the same steps. But before starting with the installation process, make sure about the Python version you have chosen. Don’t forget to consider the latest one. Apart from these, if you want to build multiple projects on a single system, ensure you have installed the pip package and OpenCV Virtual Environments.
Hope this guide puts you in a state to enjoy your coding. Happy Coding!