Try setting the path this way:

 $env:path="$env:Path;C:\Python27"
Answer from Mike Shepard on Stack Overflow
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.15.2 documentation
To install the file downloaded from python.org, either double-click and select “Install”, or run Add-AppxPackage <path to MSIX> in Windows PowerShell.
Discussions

I'm trying to use Python in PowerShell - Stack Overflow
Click OK. Test this change by restarting your Windows PowerShell. Type ... Now Python version 2 runs! Yay! ... This works! Added these to the path: C:\ProgramData\Anaconda3 and C:\ProgramData\Anaconda3\Scripts 2018-06-20T19:48:45.897Z+00:00 More on stackoverflow.com
🌐 stackoverflow.com
Setting path for Python in PowerShell? - Stack Overflow
I have two Python versions on my machine (Windows Vista), 2.6 (located in C/Program files) and 2.7 (located in C/). 1- I open PowerShell 2- I type python, and it calls python 2.6.1. 3- I want to change the path for Python 2.7, so I type: [Environment]::SetEnvironmentVariable("Path", ... More on stackoverflow.com
🌐 stackoverflow.com
Adding Python to PATH on Windows - Stack Overflow
Make sure you don't have a folder in your PATH that doesn't exist. In my case, I had a bunch of default folders (Windows, Powershell, Sql Server, etc) and then a custom C:\bin that I typically use, and then various other tweaks like c:\python17, etc. More on stackoverflow.com
🌐 stackoverflow.com
Powershell cant run Python
All you have to do is add your python path to the environment variables and it should work fine. When you install python it should ask if you want to add python to environment variables/path and it should work. More on reddit.com
🌐 r/learnpython
48
36
November 12, 2018
🌐
Medium
medium.com › @ddasdocs › managing-python-in-system-path-using-powershell-b6a62b9ae76b
Managing Python in System PATH Using PowerShell | by dwdas | Medium
September 21, 2023 - # Retrieve the prevailing system-wide PATH $currentPath = [System.Environment]::GetEnvironmentVariable(“Path”, “Machine”) # Incorporate your Python path to the current PATH $newPath = $currentPath + “;C:\ProgramData\anaconda3” # Commit ...
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › python
Python on Windows for beginners | Microsoft Learn
September 14, 2026 - To set this variable from the Command Prompt, use: set PYTHONPATH=list;of;paths. To set this variable from PowerShell, use: $env:PYTHONPATH='list;of;paths' just before you launch Python.
🌐
Liquid Web
liquidweb.com › home › help docs › server administration › windows server administration › adding python path to windows 10 or 11 path environment variable
Adding Python Path to Windows 10 or 11 PATH Environment Variable | Liquid Web
December 15, 2025 - Type in the full installation path to your Python installation with Scripts added to the end of it. In our example, we are using: C:UsersAdministratorAppDataLocalProgramsPythonPython313Scripts · Check the path again using the method listed above to verify the installation. PATH order determines which executable file you access first after entering a command. How it works: When you run a command in Command Prompt/ PowerShell, Windows scans through the directories listed in PATH – from top to bottom attempting to find a matching executable, running the first one that matters.
Find elsewhere
🌐
Geek University
geek-university.com › home › topic index › add python to the windows path
Add Python to the Windows PATH · Geek University
where python is the key Command Prompt diagnostic; Get-Command python is the PowerShell equivalent. python -m pip keeps package operations associated with the selected interpreter. The Python Launcher, accessed with py, is useful for selecting among installed versions and does not replace PATH configuration. For related setup guidance, continue with Python command-line configuration on Windows.
🌐
Blogger
chrisspearswebdev.blogspot.com › 2014 › 08 › setting-pythonpath-with-powershell.html
Chris Spears Dev: Setting the PYTHONPATH with Powershell
Powershell is the Windows hacker's best friend until it isn't. Actually, I really do enjoy the power you get from Powershell. However, figuring out how to set my python path in the shell was a frustrating experience that I hope to spare other users from.
🌐
Data to Fish
datatofish.com › add-python-to-windows-path
How to Add Python to Windows PATH
... Click on New... if no Path variable is present, Otherwise select the Path variable and then click on Edit… instead. You should then see the New User Variable box. Type Path in the Variable name field. For the Variable value you will need to know the path to the Python ...
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to add python to path on windows, linux, and mac
How to Add Python to PATH on Windows, Linux, and Mac
December 12, 2025 - The Edit environment variable window contains a list of directories previously added to PATH. To add the Python entry: 1. Select the New button in the upper-right corner. A new blank entry appears in the list. 2. Paste the address from Step 1 into the entry and press Enter. 3. Move the address to the top of the list by pressing the Move Up button. ... 5. Ensure the PATH variable now contains the Python directory by using the echo command in PowerShell...
🌐
YouTube
youtube.com › watch
How To Add Python to PATH in Windows - YouTube
The tutorial explains how to add Python to the Windows PATH in two different ways, allowing users to run Python scripts and access Python packages directly f...
Published: September 28, 2024
🌐
Geek University
geek-university.com › home › python online course › add python to path on windows
Add Python to PATH on Windows · Geek University
The correct PATH entry is the folder containing python.exe, such as C:\Python34; do not add the executable filename itself. Installation locations vary according to the Python version, installer choices, Windows account, and whether Python was installed for one user or for all users.
🌐
Reddit
reddit.com › r/learnpython › powershell cant run python
r/learnpython on Reddit: Powershell cant run Python
November 12, 2018 -

I am really new at all this so forgive me if I sound dumb or ignorant.I am just beginning to learn Python.Initially,I was going through Microsofts Introduction to Python on edX and I went through Module 1 but I didnt understand how to access the web coding assignment at the end.I still went through all the exercises and the MCQ's and I was doing pretty good at them so I didnt want to give up so I decided to find another way to learn. I got the pdf of Learn Python the Hard Way and decided to follow that instead.

I have already installed Atom and Python 3.6.7 and clicked add file path.But when I tried to type python in Powershell nothing comes up and I cant run anything.Its driving me crazy and I spent like an hour trying to get it to run but nothing.How can I get it to run?

Anyway,can I just follow the steps in Learn Python the Hard Way using Jupyter Notebooks instead?I went through exercise 1 in LPTHW in Jupyter and it seemed fine but in the book the author says if I cant set up then I shouldnt even continue and its stressing me out.

Again,I am really new to all of this,I am like a super beginner in Python.If anyone can help,I would be eternally so grateful to the stars and beyond.

Thanks!

EDIT:Thanks for the help everyone.I tried to set a new file path but even then I couldnt get anything in Powershell.I decided to use IDLE instead for now.Maybe over the weekend I may try to figure out whats wrong again.

🌐
YouTube
youtube.com › watch
How to Add Python to PATH on Windows (Step-by-Step Guide) - YouTube
Learn how to manually add Python to the PATH on Windows. This lets you run Python and pip from the command prompt. Step-by-step instructions show how to loca...
Published: March 18, 2026
🌐
Super User
superuser.com › questions › 1806438 › add-python-exe-to-the-path-on-windows
python3 - Add python.exe to the path on Windows - Super User
August 30, 2023 - no, PATH is your local variable so no need to change the system PATH. Just update it in the powershell profile $env:PATH = "path\to\python3;$($env:PATH)", or set the variable manually in cmd set "PATH=path\to\python3;%PATH%