Last Updated on May 13, 2024 by Roshan Parihar
To install Python on Windows in a specified directory location, download the setup from the official Python website and complete the installation process.
The Windows version can be any of your choice including Windows 7, 10, and all other versions of Windows. Let’s see the installation process of Python on Windows.
How to Install Python on Windows (in a Specific Directory)?
Here is the step-by-step process on how to install Python on Windows in your specified directory:-
Step 1Download Python
First of all, you have to open the Python official website to download the latest version of python on your computer system. You can find the latest version of Python there to download on your Windows operating system.
The above screenshot shows the button with the text “Download Python 3.12.3“. You have to click this button to start downloading the latest version of Python to your Windows.
Step 2Choose “Customize Installation” to Install in a Specific Directory Location
After you download the latest Python setup on your computer system. You have to double-click the Python setup installer to start installing Python.
Firstly, click the checkbox with the text content “Add Python 3.12.3 to PATH“. This process adds the Path of Python to your computer system.
After that, You have to select the link option with the text “Customize Installation” to install the Python on a specified location of the computer system. This starts the installation process of Python on your computer system in a specified directory.
Step 3: Select Optional Features
In this step, you will get a screen that shows various optional features to select and install for Python. You don’t need to click any checkbox and leave them as it is.
So, just click the “Next” button to go to the next step.
Step 4: Advanced Options and Customize Install Location
In this step, you can select advanced options and specify the required directory location where you want to install Python.
After you complete selecting the advanced option of your choice, click the ‘Browse’ button to select the location where you want to install Python.
The above image shows that the installation directory location is in the Python folder of C:// drive. After selecting the location, click the “Install” button to start the installation progress for Python.
The above image shows the installation progress and the addition of all Python files and libraries. You have to wait until it completes the setup process.
Step 4: Finally, Installation Successful
After the installation progress is completed. You will get a message that ‘Setup was successful’ that indicates the completion of the installation of Python.
Let’s check whether Python is installed on your Windows computer system or not.
How to Check If Python is Installed or Not
To see if Python is installed or not, you have to first open the command prompt using the ‘window+R’ keyboard shortcut. After that, type the word ‘cmd’ to open the command prompt as shown in the image below.
When you open the command prompt, it may contain the location (C:\Users\Roshan Singh Parihar>) as shown in the image below. As you have installed your Python on location C:://Python. You have to change the directory location to this directory using the ‘cd’ command.
The above image shows all the commands and steps to follow and check if Python is installed or not. The explanation of each command is given below.
Explanation of Commands
To move back to the parent directory C://, you have to use the ‘cd..’ command as given below:
C:\Users>cd..
C:\>
In the above commands, it uses the command ‘cd..’ two times to move to the base location C://.
After that, you have to use the command ‘cd python’ to move to the C://Python directory location.
C:\Python>
The above commands show the location is a move to C://Python which is the main location where you install Python.
Now, you can check whether Python is installed on your computer system or not using the python
command.
Python 3.12.3 (tags/v3.12.3:0a7dcbd, May 13 2024, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
The above output shows the Python version with Windows bit versions and help, copyright, credits, and license to check for Python.
DOWNLOAD Free PYTHON CHEAT SHEET
You may also like to read.