Possibly because after python 3.3 intended command is not python, but simply py
Detailed explanation here
And short answer to your question:
check if powershell command py -0p --list-paths finds any versions.
I have read through some previous posts with the same issue but the solutions are not working for me. Hoping someone can point to my error.
-
Trying to delete Python reference in Windowsapps directory using windows explorer. I get an error message that does not let me delete them.
-
In environmental variables I moved windows apps down below the python line. I still get an error message in Powershell that Python not found.
Possibly because after python 3.3 intended command is not python, but simply py
Detailed explanation here
And short answer to your question:
check if powershell command py -0p --list-paths finds any versions.
I am using Windows 11, Python3.10 and Laptop, and Windows Powershell cannot show Python version (command: python --version).
Solution: type Python inside Windows Powershell, it will prompt out Microsoft Store, just click "get", wait to finish the process, then go to Windows Powershell, type "python --version", it can show the Python version.
Why doesn't python 3.10.0 show up on PowerShell?
Python not found by command prompt
Powershell cant run Python
Cannot run .py files in PowerShell
Videos
Try setting the path this way:
$env:path="$env:Path;C:\Python27"
For what's worth, this command did it for me (Python 3.3):
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Python33", "Machine")
I just had to restart the PowerShell window after that.
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.
Or just simply type 'py' instead of 'python' in the PowerShell and hit enter.

You need to add the path to your environment variables:
Control Panel>System and Security>System>Advanced System Settings>Environment Variables
Select edit PATH and append:
C:\Users\lenovo\AppData\Local\Programs\Python\Python36
to the path. Hit apply and ok. After closing and reopening the shell you should be able to type "python" and be in the python shell.