Where is Python installed on Windows, macOS, and Linux-Ubuntu?

Python is the most widely used programing language used for development these days.

If you have installed Python in your system and you want to find where is it installed on your PC; then you have come to the right place. 

We will discuss some easy steps to find where Python is installed in your Operating system. 

Follow the steps mentioned below according to your operating system and find Python’s original pathway or location on your OS. 

Where is Python installed on Windows?

In the Windows operating system, files are usually installed in the Program Files folder of the disk on which the Windows is installed, and it is typically Local Disk C.

But it’s a time-consuming process to open it and find the python files folder by folder because each folder has many files, and to check them one by one is such a tricky way.

So, to save your time, you can find the python path easily by using a simple command in a command prompt or power shell. 

  • Open cmd or power shell and write where Python on it.
  • The path where Python is saved will be displayed on the screen, and you can easily access where the Python is installed on your Windows.

C:\Users\Shahid>where python
C:\Python35\python.exe
C:\Users\Shahid\AppData\Local\Microsoft\WindowsApps\python.exe

C:\Users\Shahid>python --version
Python 3.5.4

C:\Users\Shahid>python -V
Python 3.5.4

Where is Python installed on macOS?

In the macOS, Python is usually pre-installed in its system.

But when you install an upgraded version of Python, it will be saved in the Binary Folder of the macOS.

You can find the path where Python is installed by using the following command on the terminal.

  • Open terminal on your macOS and write which Python on it.
  • The path of Python that was pre-installed in your system will be displayed on the screen. 
  • If you have upgraded it to 3.x versions of Python, just write which python3 on the terminal screen, and you can easily get where the Python is installed on your macOS.
Shahid@C02ZV3V9MD6R ~ % python -V
Python 2.7.16
Shahid@C02ZV3V9MD6R ~ % python --version
Python 2.7.16
Shahid@C02ZV3V9MD6R ~ % which python
/usr/bin/python
Shahid@C02ZV3V9MD6R ~ % python3 --version
Python 3.7.7
Shahid@C02ZV3V9MD6R ~ % python3 -V       
Python 3.7.7
Shahid@C02ZV3V9MD6R ~ % 

Where is Python installed on Linux-Ubuntu?

Linux is a group of many Unix operating systems, and Ubuntu is one of the most famous Unix operating systems of Linux.

Pre-installed and upgraded versions of Python are saved in the Binary Folder of the system and the commands to find them are almost the same as used in the macOS.

  • Open terminal on your Ubuntu and write which Python on it. The path of Python that was pre-installed in your system will be displayed on the screen. 
  • If you have upgraded it to 3.x versions of Python, just write which python3 on the terminal screen, and you can easily get where the Python is installed on your Ubuntu.

Final Thoughts 

People think it’s quite challenging to find original pathways of Python in different operating systems, but it’s just as simple as shown above. 

The above-given commands for each operating system will surely help you find the path where the Python is installed on your specific system. 

Still, if you are confused about the process, then just speak to us, and we will try to make it, even more, simpler for you. Hope to get positive feedback from you. 

Scroll to Top