New to Python + VS Code always has issues, did the same with SQL

Hi all, I’m new to programming and python, and i remember i quit mosh’s python course last time i tried to do it for this same reason. seems trying to follow along with his course in windows when hes on a mac causes problems for me. i never have been able to get my side to do what his does. im on the very first lesson, part 5 - Your First Python Program. and i can’t even get the HelloWorld or “*” * 10 to print. Here is the error i get -

What am i doing wrong here?

Hello.
I’m also a beginner. I 'm following Mosh also with some outside lecture.
I’ll advise you run your code using command prompt or download Anaconda Prompt.
All should be fine. If there’s error while writing your code. You will be prompted and you can trace it.
Goodluck

In that particular screenshot I think the problem is that you are typing $python3 rather than simply python3 (or possibly even python). The $ in Mosh’s command line is part of the prompt, not part of the command he is entering.

1 Like

Hey - thanks for the detail. I actually tried all three different ways of typing it and got the same result

In which case you probably do not have the location that python is installed in your PATH variable. Where is python installed on your machine?

Ok so you need to add that full path to your PATH variable:

$env:Path += ";C:\<rest of path>\Programs\Python 3.10"

Otherwise you can specify the full path directly at the prompt.

Note: that is a shortcut so you could see where that shortcut points to instead. Also, that shortcut name is “Python 3.10” so you cannot just use “python” or “python3” at that path.