How to Install Python in a Specific Directory on Windows

Last Updated on May 19, 2021 by Roshan Parihar

In this tutorial, learn how to install Python in a specified directory location on Windows. You need to follow the step-by-step process to install Python given in this post.

This tutorial is helpful to download and set up Python on your Windows OS. The Windows version can be any of your choice including Windows 7, 10, and all other versions of Windows.

How to Install Python in a Specific Directory on Windows

Let’s start with the download of the Python installer to in it on your local computer system.

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.

open-python-website How to Install Python in a Specific Directory on Windows

The above screenshot shows the button with the text “Download Python 3.7.0“. 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 Python setup installer to start installing Python.

Firstly, click the checkbox with the text content “Add Python 3.7 to PATH“. This is process adds the Path of Python on your computer system.

Click customize option of python to install python on custom location on Windows 10 for specified location

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 the 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.

click next for customize option for custom location

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.

customize-location-new-location-browse-given

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.

click-install-python-setup-progress

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 indicated the completion of the installation of Python.

install-python-setup-successfull

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 that 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 showing in the image below.

Open cmd prompt to execute program.

When you open the command prompt, it may contain the location (C:\Users\Roshan Singh Parihar>) as showing 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.

check-if-installed

The above image shows all the commands and steps to follow and check if Python 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\Roshan Singh Parihar>cd..
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 commands ‘cd python’ to move to the C://Python directory location.

C:\>cd python
C:\Python>

The above commands show the location is a move to C://Python that 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.

C:\Python>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 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.

How to Find the Version of Python

To check the Python version installed on your computer system, you have to use the command python --version. The below image shows the use of the command and the output that shows the version of Python.

python-check-version

DOWNLOAD Free PYTHON CHEAT SHEET

You may also like to read.

Hope you like this tutorial on how to install Python to a specified directory on a Windows computer system.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.