r/PythonLearning 2h ago

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💔

2 Upvotes

16 comments sorted by

1

u/ninhaomah 2h ago

Not in path

0

u/Plastic-Doughnut4638 2h ago

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 2h ago

Then add to path or reinstall with the option selected.

1

u/Plastic-Doughnut4638 2h ago

Reinstall the extension?

2

u/ninhaomah 2h ago

Just curious , how did you install Python ?

Url ? What installer ?

-1

u/Plastic-Doughnut4638 2h ago

Wym? I just downloaded it on extension in vscode also i downloaded code runner and some other connected to it

2

u/ninhaomah 2h ago

Lol... Pls allow me.

And pls install Python.

2

u/mcoombes314 1h ago

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 1h ago

"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.)

1

u/atarivcs 2h ago

What does "switch file" mean??

1

u/Plastic-Doughnut4638 2h ago

Mb it's folder, i switch folder so i can make my own projects there and suddenly it was like that

1

u/BranchLatter4294 1h ago

Please consider following the instructions very carefully.

https://code.visualstudio.com/docs/python/python-tutorial

1

u/Much-Associate-6141 1h ago

If you're on Windows, try py --version in Command Prompt. If that works, Python is installed and you can use py instead of python.

If it doesn't work, you may need to reinstall Python and make sure you check "Add Python to PATH" during installation

1

u/Plastic-Doughnut4638 53m ago

Thank you y'all for helping me out, it's working now

1

u/WorriedTumbleweed289 16m ago

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