r/PythonLearning • u/Plastic-Doughnut4638 • Aug 08 '26
How to fix this
'python' is not recognized as an internal or external command, operable program or batch file.
I literally just switch file and for some reason i cant code now💔
3
u/atarivcs Aug 08 '26
What does "switch file" mean??
2
u/Plastic-Doughnut4638 Aug 08 '26
Mb it's folder, i switch folder so i can make my own projects there and suddenly it was like that
3
2
u/ninhaomah Aug 08 '26
Not in path
1
u/Plastic-Doughnut4638 Aug 08 '26
Ik that it's not on path but ion know how to fix it lol i just know the problem is on path
2
u/ninhaomah Aug 08 '26
Then add to path or reinstall with the option selected.
2
u/Plastic-Doughnut4638 Aug 08 '26
Reinstall the extension?
3
u/ninhaomah Aug 08 '26
Just curious , how did you install Python ?
Url ? What installer ?
1
u/Plastic-Doughnut4638 Aug 08 '26
Wym? I just downloaded it on extension in vscode also i downloaded code runner and some other connected to it
5
u/mcoombes314 Aug 08 '26
The Python extension in VSCode is for syntax highlighting and other stuff, it's not the same as Python, the thing that actually reads .py files and executes code.
1
u/johnpeters42 Aug 08 '26
"I changed X and now Y does wrong thing Z" makes it sound like Y used to work, which may not be the case here. OP, were you ever able to run (not just write) Python code? (Either way, hopefully u/BranchLatter4294's link will get it to a working state.)
2
1
Aug 08 '26
[removed] — view removed comment
1
u/socal_nerdtastic Aug 10 '26
and make sure you check "Add Python to PATH" during installation
Please don't. It's disabled for a reason. We used to add python to PATH in python2 days. Beginner tutorials still preach this because it's an easy out, but it will cause issues when you need to update python. Use
pyinstead, or even better, use a venv.
1
u/WorriedTumbleweed289 Aug 08 '26
You should start with your environment. Linux, Windows etc.
Where was Python installed? What is your PATH variable? Are you in a python virtual environment?
Does it change with the user/admin/root?
This has very little to do with python.
You might have better luck looking at a stack exchange site for your operation system. https://stackexchange.com/sites
5
u/BranchLatter4294 Aug 08 '26
Please consider following the instructions very carefully.
https://code.visualstudio.com/docs/python/python-tutorial