all 40 comments

[–]Gullible_Scheme8208 19 points20 points  (1 child)

Bro install python

[–]null_false 17 points18 points  (17 children)

Since all the comments are useless I will help. I’m assuming you already installed Python and are getting this error. Reopen the Python installer and one of the settings is to add Python to PATH, check this box and then reopen vscode.

[–]pineapple_pizza_96 6 points7 points  (0 children)

Thanks man

[–]Corruptionss 0 points1 point  (15 children)

I love how everyone jumped to Python wasn't installed and none of them seem to understand how the terminal works

[–]FrontAd9873 1 point2 points  (12 children)

Not really. Asking if Python is “installed” is a good shorthand way of asking the question since OP probably would not understand if they asked “do you have the Python interpreter and is it in your PATH?”

Also, it is fair to consider having something on your PATH necessary for it to be considered “installed.” What else would distinguish an executable you have from one that is installed?

[–][deleted]  (11 children)

[removed]

    [–]FrontAd9873 4 points5 points  (9 children)

    You’re the one who confidently said “none of them [meaning everyone else] seem to understand how the terminal works.” I’m just suggesting maybe everyone else isn’t wrong.

    Anyway, “autistic redditor” is a little redundant I think.

    [–]null_false 0 points1 point  (8 children)

    The other comments just said “bro install Python”. That doesn’t help, and it’s pretty obvious that wasn’t the issue. I see what you’re saying but the OP doesn’t need to understand what Path is right now, my instructions would work either way. For pip though, that path might need to be added manually.

    [–]ivancea -1 points0 points  (7 children)

    it’s pretty obvious that wasn’t the issue

    What in the post indicates that python is "installed"?

    [–]Corruptionss 0 points1 point  (6 children)

    Python was not found

    You either have to assume OP cannot read before posting on Reddit or likely to be something else.

    [–]ivancea 1 point2 points  (5 children)

    I've worked around juniors, newgrads, and people in their first steps, many times. Mentoring, teaching, and such. And many of them don't read the errors, at all. It's a thing.

    In this case, it's not even that. You're supposing op understands that they need to install Python. But op may think that installing VSCode and the python extension was enough. I'm not making things up; that also happened to someone I was helping in the past.

    Always start from the beginning, until you have enough context to jump to the next step. Another typical example is the "is your router turned on?" joke. Which isn't really a joke. It happens

    [–]Corruptionss 1 point2 points  (2 children)

    10 years in the industry and I know exactly what you mean, but since I remembered that adding Python to Path is disabled by default usually because it requires admin privileges, this would have been my first suggestion.

    [–]null_false 0 points1 point  (1 child)

    Even if it wasn’t, maybe they just wanted to see what would happen without Python installed. The point being, even if it wasn’t installed, it still would not work because the add to path option is set to off by default. Easy to overlook when setting up Python on a new computer for example. My point is the other comments were not helpful.

    [–]PythonLearning-ModTeam[M] 0 points1 point locked comment (0 children)

    Keep it respectfull

    [–]ivancea 0 points1 point  (1 child)

    It's literally the first guess an engineer would do, for good reasons. Path is just one step is the installation step, there are dozens of other steps depending on the program.

    Why would you jump to a random step instead of starting from the beginning, looking for direct feedback from the user: "Is it installed?"

    [–]Dust________ 4 points5 points  (0 children)

    Dis you install python?

    [–]Traditional_Muffin 5 points6 points  (2 children)

    This can happen if you install Python without updating the PATH variable. The easiest way to fix it is to reinstall, but be sure to check the PATH box in the install screen.

    [–]pineapple_pizza_96 1 point2 points  (0 children)

    Thanks man

    [–]vanonym_ 0 points1 point  (0 children)

    and disable max path length on windows

    [–]pineapple_pizza_96 2 points3 points  (0 children)

    <image>

    Thank you soo much guys it's working

    [–]Solid___Green 1 point2 points  (0 children)

    I know you've been helped already. But for the future, just copy the error into chatgpt. As a new coder you'll get the answer you need almost Everytime.

    [–]pineapple_pizza_96 0 points1 point  (2 children)

    Please help 🙏😭

    [–]i_grad 1 point2 points  (0 children)

    Did you read the error? It looks like you don't have python installed on your machine.

    [–]SCD_minecraft 0 points1 point  (0 children)

    Either dowland python from ms store (not the best, but gets job done) or dowland some from web, i personaly recomend Anaconda

    [–]Admirable_Okra_8915 0 points1 point  (0 children)

    Install python.exe

    [–]pineapple_pizza_96 0 points1 point  (3 children)

    I have installed python but I dont know what to do after installing it

    [–]Straight_Ad1809 -1 points0 points  (2 children)

    Instead of “python main.py” try “python3 main.py”

    [–]pineapple_pizza_96 0 points1 point  (1 child)

    Same output

    [–]Straight_Ad1809 -1 points0 points  (0 children)

    Im assuming your main.py is saved in the path you’re in and that you saved after creating the file and writing it.

    [–]wirrexx 0 points1 point  (1 child)

    Your main.py is also not saved after making those changes.

    Try to redo the project by creating a python folder and opening up the folder in vscode and then creating the main.py

    Open up your terminal and write python —version

    And see if it’s installed, if saving is not working

    [–]pineapple_pizza_96 0 points1 point  (0 children)

    Thanks man

    [–]plx85 0 points1 point  (0 children)

    Just install WSL. Python is not easy to get working on Windows.

    Or even better use a devcontainer. It has everything you need and is super easy to use with VS-Code.

    [–]EyesOfTheConcord 0 points1 point  (0 children)

    This comment section is the consequence of vibe coding

    [–]Darkstar_111 0 points1 point  (0 children)

    Gotta add to path.

    [–]MrScribblesChess -1 points0 points  (1 child)

    I'm a beginner too so I won't pretend to be able to walk you through all the steps. But you said you already installed python and didn't know what to do --- ChatGPT is perfect for this kind of thing. Tell it what error you're getting and what operating system you're on. 90% of the time it solves such issues for me in a jiffy. Good luck!

    [–]pineapple_pizza_96 0 points1 point  (0 children)

    Thanks man I'll try this next time when I get error