# Python Installation

**URL:** <https://discuss.python.org/t/python-installation/40571>\
**Category:** Python Help\
**Created:** [December 7, 2023, 4:11pm UTC](https://discuss.python.org/t/python-installation/40571 "2023-12-07T16:11:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srivani](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Srivani](https://discuss.python.org/u/Srivani)\
**Post date:** [December 7, 2023, 4:11pm UTC](https://discuss.python.org/t/python-installation/40571/1 "2023-12-07T16:11:45Z")

</div>

Hello,

I recently got python downloaded in my system. able to open all terminals, Idle windows able to access Pycharm. but really not sure where is the exact location of Python installed when i try to check from Command prompt. I wanted to add Environmental Variables. Please help.

---

<div class="post-metadata">

**Author:** ![barry-scott](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@barry-scott](https://discuss.python.org/u/barry-scott)\
**Post date:** [December 7, 2023, 5:34pm UTC](https://discuss.python.org/t/python-installation/40571/2 "2023-12-07T17:34:39Z")

</div>

You can use the `py` command in a windows terminal and then you do not need to chage your PATH. Does that help?

---

<div class="post-metadata">

**Author:** ![Rieidi](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/rieidi/32/16322_2.png) [@Rieidi](https://discuss.python.org/u/Rieidi)\
**Post date:** [December 7, 2023, 6:18pm UTC](https://discuss.python.org/t/python-installation/40571/3 "2023-12-07T18:18:27Z")

</div>

1. Find the Path to Python:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/python1/original/3X/5/c/5c6cb89104bc54e5ae8b28bd0d9c62a885ef052d.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/python1/original/3X/e/3/e3188ce475231bdd5acf9d3552ca6e8962704452.png)

First, find out where Python is installed on your system. Typically, the default path is  
something like `C:\Python39` on Windows or `/usr/bin/python3` on Linux. Make sure to  
replace these paths with the ones corresponding to your installation.  
2. Copy the Python Path:  
Copy the full path to the folder where Python is installed.  
3. Add to PATH on Windows:  
On Windows, right-click on the Computer or This PC icon and select “Properties.”  
Click on “Advanced system settings” and then “Environment Variables.”  
In the “System variables” section, find the variable called “Path” and click “Edit.”  
Click “New” and add the path you copied earlier.  
Click “OK” in all windows to confirm the changes.  
4. Check if It’s Working:  
Open a new terminal and type `python` or `python3`. It should start the Python interpreter.

---

<div class="post-metadata">

**Author:** ![Srivani](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Srivani](https://discuss.python.org/u/Srivani)\
**Post date:** [December 7, 2023, 6:42pm UTC](https://discuss.python.org/t/python-installation/40571/4 "2023-12-07T18:42:03Z")

</div>

thank you so much @barry-scott

---

<div class="post-metadata">

**Author:** ![barry-scott](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@barry-scott](https://discuss.python.org/u/barry-scott)\
**Post date:** [December 7, 2023, 7:12pm UTC](https://discuss.python.org/t/python-installation/40571/5 "2023-12-07T19:12:43Z")

</div>

> [@Rieidi](#):
>
> default path is  
> something like `C:\Python39` on Windows

The default is in `c:\program files\python something` these days.

---

<div class="post-metadata">

**Author:** ![gwerbin](https://avatars.discourse-cdn.com/v4/letter/g/76d3ee/32.png) [@gwerbin](https://discuss.python.org/u/gwerbin)\
**Post date:** [December 7, 2023, 7:28pm UTC](https://discuss.python.org/t/python-installation/40571/6 "2023-12-07T19:28:54Z")

</div>

The exact location will depend on what OS you’re using and how you installed it.

However, you can check from inside Python itself, on any platform, using [`sys.executable`](https://docs.python.org/3/library/sys.html#sys.executable). The docs mention that it’s possible for this `None` if the executable location is unknown, but I’ve never encountered a situation in which that would happen during normal usage.

If you’re on Windows specifically and you used the official installer package from [Download Python | Python.org](https://www.python.org/downloads/), you should also have the special `py.exe` “launcher” program, which helps reduce the need for changing environment variables. See [4. Using Python on Windows — Python 3.12.0 documentation](https://docs.python.org/3/using/windows.html#launcher).
